I'm using ExifInterface
for rotationg image picked from gallery by detecting orientation tag, and it's working. Recently I tested app on Xiaomi Mi 9 SE and found out that photo took from camera has orientation tag 8 (rotate 270) but the photo orientation is correct and doesn't require rotationg. Why orientation tag is wrong? How can i find correct orientation for rotating?
Asked
Active
Viewed 698 times
6

Sajjad Zaheri
- 88
- 6
-
I face the same problem on Xiamo Mi. The EXIF tag says it needs 90° rotation, but it is already in correct orientation. Did you find a solution? – Max Power Feb 08 '20 at 15:33
-
@MaxPower Unfortunately not yet. – Sajjad Zaheri May 04 '20 at 00:22
-
1The same problem on Xiaomi Mi8 Android 10 for a photo just taken by the camera. EXIF orientation is 6 (ORIENTATION_ROTATE_90 - "the image is rotated by 90 degree clockwise"). Has anyone found a solution? – Gregory Jun 27 '20 at 14:25
-
See solution here: https://stackoverflow.com/questions/3647993/android-bitmaps-loaded-from-gallery-are-rotated-in-imageview – Gregory Jun 27 '20 at 15:21
-
1This is a device bug. – Alex Cohn Aug 16 '20 at 19:16
-
@Gregory Which answer were you referring to? The top one only solves the case where the Exif was tagged correctly. I wrote both camera and image loading for review and made sure they followed the recommended practices yet still have issues only on some Xiaomi devices. – Curious Sam Oct 21 '21 at 16:50