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

Handle removing orientation from alternate types of EXIF data #5584

Merged
merged 1 commit into from Jul 6, 2021

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jul 6, 2021

Resolves #5580

When an image is copied in exif_transpose(), the info dictionary is copied. However, this is not the only way to specify orientation - it might also be specified through tag_v2 or the user may have set it on Image.Exif() directly, which are not copied to a new image. So an error was raised if exif_transpose() tried to remove the orientation if the orientation wasn't there.

This PR allows for the orientation to be already absent after copying, and also removes the orientation from the "Raw profile type exif" the "XML:com.adobe.xmp" info keys if they are used instead.

@hugovk hugovk merged commit 340adc5 into python-pillow:master Jul 6, 2021
50 checks passed
@radarhere radarhere deleted the exif_transpose branch Jul 6, 2021
@radarhere radarhere added the Exif label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants