Do not save XMP from JPEG info#8483
Merged
hugovk merged 3 commits intopython-pillow:mainfrom Dec 27, 2024
Merged
Conversation
This was referenced Oct 18, 2024
Closed
radarhere
added a commit
to radarhere/Pillow
that referenced
this pull request
Dec 28, 2024
radarhere
added a commit
to radarhere/Pillow
that referenced
this pull request
Dec 28, 2024
radarhere
added a commit
to radarhere/Pillow
that referenced
this pull request
Dec 28, 2024
radarhere
added a commit
to radarhere/Pillow
that referenced
this pull request
Feb 27, 2025
eyedav
pushed a commit
to eyedav/Pillow
that referenced
this pull request
Jul 19, 2025
eyedav
pushed a commit
to eyedav/Pillow
that referenced
this pull request
Jul 19, 2025
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #8479
Typically, XMP data is only saved to an image through an argument when saving, such as
im.save("out.jpg", xmp=b"test").#8286 included a commit to allow XMP data to be specified for the second frame of an MPO image when saving by using the
infodictionary.However, #8479 had pointed out that this means XMP info is now saved by default from images, and suggests that this may not be ideal. It's also not what WebPImagePlugin does.
So this PR stops XMP saving from the
infodictionary.However, to try and keep the ability to set XMP data for a second frame when saving, I suggest instead using
encoderinfo.That would provide a generic way to set additional options when saving subsequent frames.