JPEG comments are from the COM marker by radarhere · Pull Request #8788 · python-pillow/Pillow

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@radarhere

Copy link Copy Markdown

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@radarhere @hugovk