Skip to content

Raise an error if EXIF data is too long when saving JPEG#6939

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:exif
Feb 11, 2023
Merged

Raise an error if EXIF data is too long when saving JPEG#6939
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:exif

Conversation

@radarhere
Copy link
Member

Resolves #6932

https://en.wikipedia.org/wiki/Exif

Exif metadata are restricted in size to 64 kB in JPEG images because according to the specification this information must be contained within a single JPEG APP1 segment.

This PR raises an error if EXIF data is too large when saving JPEG.

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.

Saving TIFF as JPEG fails with OSError: encoder error -2

2 participants