Skip to content

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

2 participants