bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

DefaultImageHeaderParser fails to determine correct orientation #3944

Open grote opened 5 years ago

grote commented 5 years ago

Glide Version: 4.10.0

Integration libraries: none

Device/Android Version: Pixel 2 XL Android 10

Issue details / Repro steps / Use case background: Glide (but in its defense also my browser) fails to determine the orientation of this image:

rotate-test

DefaultImageHeaderParser#getOrientation() returns UNKNOWN_ORIENTATION.

However, Android's gallery app and my Linux image viewer apps display the orientation correctly. Here's jhead output:

Resolution   : 800 x 600
Orientation  : rotate 90
Jpeg process : Progressive
JPEG Quality : 93

So the orientation is in there, but maybe it is hard to parse?

photospringdev commented 4 years ago

We are having the same issue - some with Google Pixel but also with Samsung galaxy. Gallery app on our device displays correctly. I cannot publicly share the photos that have issues but if you email support@ photospring I can email you the photos.

Apu-RR commented 3 years ago

Same issue here, will this be fixed anytime soon?

quite commented 3 years ago

Same issue on Nokia 5.3 (2020) with Android 10. Seems consistent for all photos taken in portrait orientation. exiv2 says: Exif.Image.Orientation Short 1 right, top Attaching one.

IMG_20210426_155126

grote commented 3 years ago

Glide (but in its defense also my browser) fails to determine the orientation of this image

Update: Firefox now correctly identifies the orientation. I guess it is time for glide to follow.

quite commented 3 years ago

Update: Firefox now correctly identifies the orientation. I guess it is time for glide to follow.

Does the old and new Firefox behave the same with the image I posted above? (fail and succeed, respectively)

quite commented 3 years ago

I did manage to install Firefox 70. Both it and recent Firefox 88 displays the above photo correctly as a portrait.

grote commented 3 years ago

Sorry, I don't remember what Firefox version I had installed in 2019 when I reported this issue. But good to know that even Firefox 70 fixed the problem.