Issue #20197: Added support for the WebP image type in the imghdr module.

Patch by Fabrice Aneche and Claudiu Popa.
This commit is contained in:
Serhiy Storchaka 2014-05-25 11:45:37 +03:00
parent e84d26c61b
commit 2f8dca735e
6 changed files with 17 additions and 1 deletions

View file

@ -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 #
#--------------------#