Łukasz Langa <luk...@langa.pl> added the comment: When JFIF and Exif markers are removed, what we're left with is a "raw" JPEG file.
I added a raw equivalent of Lib/test/imghdrdata/python.jpg by running: $ exiftool -all= python.jpg -o python-raw.jpg Mohamad's patch correctly adds support for such files. In fact, browsing through how other languages do this, it seems like the FF D8 FF DB sequence is a relatively popular "magic sequence". It's even listed in this Wikipedia page: https://en.wikipedia.org/wiki/List_of_file_signatures ---------- nosy: +lukasz.langa title: Imghdr JPG Quantized -> Support recognizing JPEG files without JFIF or Exif markers _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com