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

XMP tag orientation generated by exiftool is not handled #6462

Closed
bigcat88 opened this issue Jul 25, 2022 · 1 comment · Fixed by #6463
Closed

XMP tag orientation generated by exiftool is not handled #6462

bigcat88 opened this issue Jul 25, 2022 · 1 comment · Fixed by #6463

Comments

@bigcat88
Copy link
Contributor

Exiftool generates orientation like this:
<tiff:Orientation>8</tiff:Orientation>

Current code:

transposed_image.info["XML:com.adobe.xmp"] = re.sub(
                    r'tiff:Orientation="([0-9])"',
                    "",
                    transposed_image.info["XML:com.adobe.xmp"],
                )

does not handle this situation.

@radarhere
Copy link
Member

Just to note - this doesn't happen for every image that exiftool processes.

Here is some code to demonstrate.

import os
from PIL import Image

Image.new("RGB", (1, 1)).save("out.png")
os.system("exiftool -orientation#=3 out.png")
assert "XML:com.adobe.xmp" not in Image.open("out.png").info

@mergify mergify bot closed this as completed in #6463 Jul 30, 2022
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

Successfully merging a pull request may close this issue.

2 participants