Skip to content

Conversation

@radarhere
Copy link
Member

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
@radarhere radarhere deleted the exif_transpose branch July 6, 2021 07:10
@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

Development

Successfully merging this pull request may close these issues.

ImageOps.exif_transpose raises a KeyError when removing the EXIF orientation tag

2 participants