Skip to content
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

Ignore JPEG Thumbnails #1

Open
OmarShehata opened this issue Feb 24, 2019 · 0 comments
Open

Ignore JPEG Thumbnails #1

OmarShehata opened this issue Feb 24, 2019 · 0 comments

Comments

@OmarShehata
Copy link
Collaborator

The JPEG byte editor we've got will extract the header, remove it, and allow you to edit just the body. We do this by checking for the SOS (start of scan) marker, which is FFDA or 255 218.

But if the JPEG contains a thumbnail, there will be two SOS markers, since the stored thumbnail is itself another JPEG image. This will incorrectly append another body, so it leads to a lot of extra bytes that don't change the image at all.

We can get around this by just having all our sample JPEGs not include a thumbnail, but to make it work for any user supplied JPEG this would be nice to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant