diff options
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r-- | Lib/imghdr.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py index 6e01fd8..afcb677 100644 --- a/Lib/imghdr.py +++ b/Lib/imghdr.py @@ -35,9 +35,11 @@ def what(file, h=None): tests = [] def test_jpeg(h, f): - """JPEG data in JFIF or Exif format""" + """JPEG data with JFIF or Exif markers; and raw JPEG""" if h[6:10] in (b'JFIF', b'Exif'): return 'jpeg' + elif h[:4] == b'\xff\xd8\xff\xdb': + return 'jpeg' tests.append(test_jpeg) |