FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improved consistency of XMP handling by radarhere · Pull Request #8069 · python-pillow/Pillow · GitHub

Improved consistency of XMP handling - #8069

Merged
hugovk merged 4 commits into
python-pillow:mainfrom
radarhere:xmp
Jun 19, 2024
Merged

Improved consistency of XMP handling#8069
hugovk merged 4 commits into
python-pillow:mainfrom
radarhere:xmp

Conversation

Copy link
Copy Markdown
Member

#5076 (comment) is a user who would like to retrieve XMP strings from images. This can be done, but inconsistently between formats.

This PR updates JPEG, TIFF and PNG to create im.info["xmp"] like WEBP does.

Then, given that common location of XMP data, it makes sense to tidy up the code by adding getxmp() to the Image class, rather than duplicating it for each of supported formats. getxmp() will return an empty dictionary for other formats.

hugovk merged commit 96b1cab into python-pillow:main Jun 19, 2024
radarhere deleted the xmp branch June 19, 2024 21:37

Copy link
Copy Markdown
Contributor

Since this change removed the _getxmp function - which I used in pillow_heif, could you at least add parsing for the NULL terminating byte in xmp? @radarhere

Info is here:

bigcat88/pillow_heif#69
AOMediaCodec/libavif#1333 - topic is big, but most important are last messages

Because now I need to either remove the leading byte, which will lead to the fact that if the image is opened and saved, the xmp will differ in a result by that one byte.

That will allows me to just remove getxmp from pillow_heif, otherwise I will need to copy old _getxmp code and use it..

Copy link
Copy Markdown
Member Author

Ah, I had presumed I was just removing an unused internal method.

I've created #8171. Let us know if you have any feedback.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL