-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
CR2 / TIFF image loads with incorrectly applied orientation / rotation #8554
Comments
NOTE: Commenting out this line of code fixes the issue, at least in the sense of then it does not rotate at all (and is in the native sensor orientation) However, the orientation tag is still not exposed to img.getexif() for some reason https://github.com/python-pillow/Pillow/blob/main/src/PIL/TiffImagePlugin.py#L1317-L1319 |
It's not yet clear to me why the final image is unexpected.
When a TIFF image is automatically transposed on load, |
Sorry, I meant in my test I commented out all 3 lines there |
If I make that change, I do see the Orientation tag printed out by your script. import pathlib
import PIL.Image, PIL.ExifTags
root = pathlib.Path(r'.')
img_path = root / '_MG_6885.CR2'
img = PIL.Image.open(img_path)
print(img.getexif()[PIL.ExifTags.Base.Orientation]) # 6 |
I've created PR #8556 to resolve this. |
Thanks so much for the quick fix! |
What did you do?
Opening a .CR2 image loads the image with an incorrectly applied EXIF orientation. The end result in one case is that the image is flipped upsidedown.
Windows explorer and Adobe bridge both show the image correctly in previews, and when opening the full image.
What did you expect to happen?
Do not rotate the image at all, and expose the EXIF tag to the user
-or- just orient properly
What actually happened?
Incorrect image
What are your OS, Python and Pillow versions?
_MG_6885.zip
The text was updated successfully, but these errors were encountered: