Skip to content

Fix EXIF orientation - #179

Merged
xavierlacot merged 2 commits into
mainfrom
fix/169-exif-orientation
Sep 25, 2026
Merged

xavierlacot merged 2 commits into
mainfrom
fix/169-exif-orientation

Conversation

@xavierlacot

Copy link
Copy Markdown
Member

fix #169

Photos shot on phones are often stored as landscape pixels plus an EXIF Orientation tag, which nothing in the pipeline honored: the transformers computed their dimensions on the stored pixels, and the processors and post-processors dropping the metadata (cwebp, jpegoptim, mozjpeg, etc.) produced variations displayed on their side. A new AutoOrientPreProcessor, built on Imagine and registered by default right after the HEIF conversion, now rotates the pixels once and resets the tag, and the pixel dimensions reported for the originals account for the orientation.

Also, the HeifPreProcessor now really produces a JPEG intermediate binary instead of a PNG labelled as JPEG, and the EXIF stripping listener of the demo keeps the orientation tag.

@xavierlacot xavierlacot added the enhancement New feature or request label Sep 25, 2026
@xavierlacot
xavierlacot merged commit d4aa202 into main Sep 25, 2026
10 checks passed
@xavierlacot
xavierlacot deleted the fix/169-exif-orientation branch September 25, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EXIF orientation is never applied: portrait photos are rendered sideways

1 participant