Skip to content

JPEG comments are from the COM marker #8788

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

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

radarhere
Copy link
Member

Requested in #8787 (comment) - a note in the documentation that JpegImagePlugin's info["comment"] is from the COM marker

def COM(self: JpegImageFile, marker: int) -> None:
#
# Comment marker. Store these in the APP dictionary.
n = i16(self.fp.read(2)) - 2
s = ImageFile._safe_read(self.fp, n)
self.info["comment"] = s

and that this is distinct from the UserComment EXIF tag.

UserComment = 0x9286

@radarhere radarhere added the JPEG label Mar 2, 2025
@hugovk hugovk merged commit 4efc096 into python-pillow:main Mar 3, 2025
5 checks passed
@radarhere radarhere deleted the jpeg_comment branch March 3, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants