Orientation of photos on Android devices

I am developing a Phonegap and jQuery-Mobile Android Application. After taking a photo - using the phonegap API - I display it in the image tag. This all works great, my problem is the orientation of the photo.

When tested on my HTC Desire (Android-Version 2.2), the photo is always in the right direction when you hold the phone in portrait mode.

But when testing on my Galaxy Tab (Samsung GT-P1000 Android-Version 2.2) or on my GT I5800 (Samsung Android-Version 2.2) I take photos and when displaying them when using the phone in portrait mode the image orientation is wrong - the images are rotated 90 degrees clockwise.

How can I be sure what orientation the paintings have after taking them? Is this a problem with Samsung devices? Does each manufacturer do it differently?

Thanks in advance!


source to share

1 answer

Well, this is definitely a problem on Samsung devices as well, as I have had to deal with it quite a bit. The problem boils down to the fact that the web browser does not look at the Exif data to see what orientation the drawing was taken in. When you copy a picture taken in portrait mode and view it in preview or any other image manipulation, the package is displayed correctly, but when you load it into your browser, it will be enabled on it.

At this point, I did not find an easy solution to the problem, and we were forced to recommend people to take pictures in landscape mode whenever possible.



All Articles