Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jun 4, 2025

Resolves #8986

The issue has found an image with XMP data that incorrectly uses an UNDEFINED tag, rather than the specified BYTE tag. This PR updates im.info["xmp"] to still end up with a string, rather than a tuple.

The XMP data is also padded with spaces at the end, similar to zero-byte padding that we've seen before. This PR trims it from the end when parsing the data in im.getxmp().

@radarhere radarhere changed the title Handle UNDEFINED XMP data Handle XMP data from an UNDEFINED TIFF tag Jun 4, 2025
@radarhere radarhere mentioned this pull request Jun 4, 2025
@hugovk hugovk merged commit de053fb into python-pillow:main Jun 10, 2025
73 of 74 checks passed
@radarhere radarhere deleted the tiff_xmp branch June 10, 2025 12:37
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.

getxmp error

2 participants