Add imghdr test for webp

This commit is contained in:
Kovid Goyal 2014-07-19 00:29:57 +05:30
parent 1f213c7948
commit 11153b1c77

View File

@ -68,6 +68,12 @@ def test_tiff(h, f):
tests.append(test_tiff) tests.append(test_tiff)
def test_webp(h, f):
if h[:4] == b'RIFF' and h[8:12] == b'WEBP':
return 'webp'
tests.append(test_webp)
def test_rgb(h, f): def test_rgb(h, f):
"""SGI image library""" """SGI image library"""
if h[:2] == '\001\332': if h[:2] == '\001\332':