Handle XMP data from an UNDEFINED TIFF tag by radarhere · Pull Request #8997 · python-pillow/Pillow
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().