S Sub7 Active Member Licensed User Longtime User Sep 21, 2014 #1 On some devices the pictures taken with camera in portrait and landscape have the same dimensions, loading an image taken in portrait mode into an imageview will result in image rotate by 90 (at least in my case) Using Jpeg Utils i thought that i could get the orientation and later rotate the image but exif.getAttribute(exif.TAG_ORIENTATION) return me always 0 is not even possible compare width and height since they are the same, anyone had the same problem? How the phone show the image correctly from gallery? (not from pc) Thanks
On some devices the pictures taken with camera in portrait and landscape have the same dimensions, loading an image taken in portrait mode into an imageview will result in image rotate by 90 (at least in my case) Using Jpeg Utils i thought that i could get the orientation and later rotate the image but exif.getAttribute(exif.TAG_ORIENTATION) return me always 0 is not even possible compare width and height since they are the same, anyone had the same problem? How the phone show the image correctly from gallery? (not from pc) Thanks
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2014 #2 Try to copy the image to the PC and check the exif headers with a photo editor app. Upvote 0
S Sub7 Active Member Licensed User Longtime User Sep 21, 2014 #3 Good morning Erel thank you, you right the exif data contain the orientation but i cannot read it. This seems to happen because tryng to read data from contentchooser Code: Sub cc_Result(Success As Boolean, Dir As String, Filename As String) exif.Initialize(Dir,Filename) 'content://media/external/images/media/33206 log(exif.getAttribute(exif.TAG_ORIENTATION)) what should i do? thanks Upvote 0
Good morning Erel thank you, you right the exif data contain the orientation but i cannot read it. This seems to happen because tryng to read data from contentchooser Code: Sub cc_Result(Success As Boolean, Dir As String, Filename As String) exif.Initialize(Dir,Filename) 'content://media/external/images/media/33206 log(exif.getAttribute(exif.TAG_ORIENTATION)) what should i do? thanks
Erel B4X founder Staff member Licensed User Longtime User Sep 22, 2014 #4 See this link: http://www.b4x.com/android/forum/threads/39313/#content Upvote 0