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

Allow writing IFDRational to UNDEFINED tag #7840

Merged
merged 2 commits into from Mar 11, 2024

Conversation

radarhere
Copy link
Member

Resolves #7839. Similar to #6890

The issue provides an image where the InteropVersion tag has type RATIONAL.
https://exiftool.org/TagNames/EXIF.html states that it should have type UNDEFINED. The tag is loaded as RATIONALs, but this causes an error when Pillow tries to write it as UNDEFINED when saving the EXIF data.

This PR simply handles the IFDRational value when saving UNDEFINED tags.

@hugovk hugovk merged commit 4e92ee0 into python-pillow:main Mar 11, 2024
57 checks passed
@radarhere radarhere deleted the write_undefined branch March 12, 2024 00:45
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 this pull request may close these issues.

exif_transpose raises TypeError: object of type 'IFDRational' has no len()
2 participants