mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
SF #75103: imghdr -- identify JPEGs in EXIF format
This commit is contained in:
parent
dd3e6cb213
commit
97db05de3e
3 changed files with 12 additions and 1 deletions
|
|
@ -101,6 +101,13 @@ def test_jpeg(h, f):
|
|||
|
||||
tests.append(test_jpeg)
|
||||
|
||||
def test_exif(h, f):
|
||||
"""JPEG data in Exif format"""
|
||||
if h[6:10] == 'Exif':
|
||||
return 'jpeg'
|
||||
|
||||
tests.append(test_exif)
|
||||
|
||||
def test_bmp(h, f):
|
||||
if h[:2] == 'BM':
|
||||
return 'bmp'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue