Skip to content

Use TIFF orientation#4063

Merged
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:transpose
Sep 20, 2019
Merged

Use TIFF orientation#4063
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:transpose

Conversation

@radarhere
Copy link
Copy Markdown
Member

@radarhere radarhere commented Sep 13, 2019

Resolves #4053. Alternative to #4062

Transpose TIFF images on load according to the orientation tag - https://www.awaresystems.be/imaging/tiff/tifftags/orientation.html

@ailintom
Copy link
Copy Markdown

Thanks a lot! This works fine for me.

@hugovk hugovk merged commit 736b843 into python-pillow:master Sep 20, 2019
@radarhere radarhere deleted the transpose branch September 21, 2019 11:30
@seb-odoo
Copy link
Copy Markdown

Hello @ailintom do you know if there is any plan to also use the orientation for JPEG files?

@ailintom
Copy link
Copy Markdown

ailintom commented Sep 27, 2019

@seb-odoo JPEG files do not have an orientation tag comparable to the TIFF orientation tag. Unlike TIFF-files,

in JFIF files, the image orientation is always top-down

see https://www.w3.org/Graphics/JPEG/jfif3.pdf
JPEG files however can have EXIF tags, including the orientation EXIF tag, indicating the orientation of camera when shooting. You can transform the image according to the EXIF orientation tag using PIL by calling ImageOps.exif_transpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TIFF orientation tag handled differently from most other software when loading G4 TIFF files

4 participants