mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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:
parent
e84d26c61b
commit
2f8dca735e
6 changed files with 17 additions and 1 deletions
|
|
@ -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 #
|
||||
#--------------------#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue