From e74a1f562b03501d423046d25cba647ee5c2424c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 11 Apr 2013 22:49:33 +0530 Subject: [PATCH] ... --- src/calibre/utils/imghdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/imghdr.py b/src/calibre/utils/imghdr.py index 913b0f7b23..c899a5be95 100644 --- a/src/calibre/utils/imghdr.py +++ b/src/calibre/utils/imghdr.py @@ -39,7 +39,7 @@ def test_jpeg(h, f): """JPEG data in JFIF format (Changed by Kovid to mimic the file utility, the original code was failing with some jpegs that included ICC_PROFILE data, for example: http://nationalpostnews.files.wordpress.com/2013/03/budget.jpeg?w=300&h=1571)""" - if (h[6:10] in (b'JFIF', b'Exif')) or (h[:2] == b'\xff\xd8' and (b'JFIF' in h[:32] or b'BIM' in h[:32])): + if (h[6:10] in (b'JFIF', b'Exif')) or (h[:2] == b'\xff\xd8' and (b'JFIF' in h[:32] or b'8BIM' in h[:32])): return 'jpeg' tests.append(test_jpeg)