New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support recognizing JPEG files without JFIF or Exif markers #88705
Comments
Previous method to check JPG images was using the following command (h[6:10] in (b'JFIF', b'Exif')) |
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: |
Thanks, Mohamad! ✨ 🍰 ✨ |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: