diff options
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r-- | Lib/imghdr.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py index add2ea8..fe77e49 100644 --- a/Lib/imghdr.py +++ b/Lib/imghdr.py @@ -110,6 +110,12 @@ def test_bmp(h, f): tests.append(test_bmp) +def test_webp(h, f): + if h.startswith(b'RIFF') and h[8:12] == b'WEBP': + return 'webp' + +tests.append(test_webp) + #--------------------# # Small test program # #--------------------# |