-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Orientation info from HEIC decoder does not match actual pixel orientation #1232
Comments
rudchenkos
added a commit
to rudchenkos/ImageMagick
that referenced
this issue
Jul 31, 2018
It turns out that in HEIC the pixels are never rotated and the metadata only indicates the orientation of the sensor when the photo was taken. Hence, there was a discrepancy between `Image->orientation` and actual pixel orientation in images loaded with the `heic` coder. Particularly, this led to incorrect behavior of the `-auto-orient` which in this case tried to compensate non-existing pixel rotation. ImageMagick#1232
dlemstra
pushed a commit
that referenced
this issue
Sep 3, 2018
* Align pixel orientation with exif:Orientation in HEIC decoder It turns out that in HEIC the pixels are never rotated and the metadata only indicates the orientation of the sensor when the photo was taken. Hence, there was a discrepancy between `Image->orientation` and actual pixel orientation in images loaded with the `heic` coder. Particularly, this led to incorrect behavior of the `-auto-orient` which in this case tried to compensate non-existing pixel rotation. #1232
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
It turns out that in HEIC the pixels are never rotated and the metadata only indicates the orientation of the sensor when the photo was taken. After
ReadHEICImage
populates EXIF profile and returns a decoded image, theexif:Orientation
property is interpreted by ReadImage which setsImage->orientation
accordingly.Hence, there is a discrepancy between
Image->orientation
and actual pixel orientation in images loaded with theheic
coder. Particularly, this leads to incorrect behavior of the-auto-orient
which in this case tries to compensate non-existing pixel rotation.Steps to Reproduce
exif:Orientation
not equal to "1" (TopLeftOrientation
). For instance, a portrait photo with one of the newer Apple iPhone devices. You can download an example photo here: https://www.dropbox.com/s/celi7ejhit9ybzb/test.heic?dl=0Preview
on macOS normally display the photo as if camera was not rotated.convert test.heic -auto-orient test.jpg
Expected result
test.jpg
appears in viewers the same way as original.Actual result
test.jpg
appears sideways.System Configuration
The text was updated successfully, but these errors were encountered: