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

Only read different sizes for "Large Thumbnail" MPO frames #5168

Merged
merged 2 commits into from Mar 7, 2021

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jan 1, 2021

Resolves #5164

MPO images are a multi-frame format. The image from the issue reports an incorrect size for the second frame in the image.

There are different MP Types according to the spec - 'Baseline MP Primary Image', 'Large Thumbnail', 'Multi-Frame Image' and 'undefined'.

This PR resolves the issue by making it so that only 'Large Thumbnail' frames can have a different size. This isn't mentioned in the spec, but it seems possible.

This did cause one of our existing tests to fail, but that was not an image found in the wild - it was an existing test image that I hexedited. When I changed the MPType to match the image from the original issue, the test passes.

@hugovk hugovk merged commit 95986f3 into python-pillow:master Mar 7, 2021
50 checks passed
@radarhere radarhere deleted the mpo branch Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants