Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TIFF orientation #4063

Merged
merged 1 commit into from Sep 20, 2019
Merged

Use TIFF orientation #4063

merged 1 commit into from Sep 20, 2019

Conversation

@radarhere
Copy link
Member

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

This comment has been minimized.

Copy link

ailintom commented Sep 13, 2019

Thanks a lot! This works fine for me.

@hugovk hugovk merged commit 736b843 into python-pillow:master Sep 20, 2019
18 checks passed
18 checks passed
codecov/patch 100% of diff hit (target 85.49%)
Details
codecov/project 85.49% (+<.01%) compared to 929c817
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
python-pillow.Pillow Build #20190913.9 succeeded
Details
python-pillow.Pillow (Lint Python37) Lint Python37 succeeded
Details
python-pillow.Pillow (alpine) alpine succeeded
Details
python-pillow.Pillow (amazon_1_amd64) amazon_1_amd64 succeeded
Details
python-pillow.Pillow (amazon_2_amd64) amazon_2_amd64 succeeded
Details
python-pillow.Pillow (arch) arch succeeded
Details
python-pillow.Pillow (centos_6_amd64) centos_6_amd64 succeeded
Details
python-pillow.Pillow (centos_7_amd64) centos_7_amd64 succeeded
Details
python-pillow.Pillow (debian_10_buster_x86) debian_10_buster_x86 succeeded
Details
python-pillow.Pillow (debian_9_stretch_x86) debian_9_stretch_x86 succeeded
Details
python-pillow.Pillow (fedora_29_amd64) fedora_29_amd64 succeeded
Details
python-pillow.Pillow (fedora_30_amd64) fedora_30_amd64 succeeded
Details
python-pillow.Pillow (ubuntu_16_04_xenial_amd64) ubuntu_16_04_xenial_amd64 succeeded
Details
python-pillow.Pillow (ubuntu_18_04_bionic_amd64) ubuntu_18_04_bionic_amd64 succeeded
Details
@radarhere radarhere deleted the radarhere:transpose branch Sep 21, 2019
@seb-odoo

This comment has been minimized.

Copy link

seb-odoo commented Sep 26, 2019

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

@ailintom

This comment has been minimized.

Copy link

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.