This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kovid
Recipients Claudiu.Popa, ezio.melotti, intgr, jcea, joril, kovid, vstinner
Date 2014-06-12.13:09:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402578567.78.0.163307936651.issue16512@psf.upfronthosting.co.za>
In-reply-to
Content
FYI, the test I currently use in calibre, which has not failed so far for millions of users:

def test_jpeg(h, f):    
    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'
History
Date User Action Args
2014-06-12 13:09:27kovidsetrecipients: + kovid, jcea, vstinner, ezio.melotti, intgr, Claudiu.Popa, joril
2014-06-12 13:09:27kovidsetmessageid: <1402578567.78.0.163307936651.issue16512@psf.upfronthosting.co.za>
2014-06-12 13:09:27kovidlinkissue16512 messages
2014-06-12 13:09:27kovidcreate