Android Question Images from camera rotation problem

Sub7

Active Member
Licensed User
Longtime User
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
 

Sub7

Active Member
Licensed User
Longtime User
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

B4X:
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…