Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android rotates pictures by 90 degrees (taken by camera) [duplicate]

Tags:

android

I am taking a picture in my Samsung Galaxy SII device from the code. After saving and displaying it on the screen I see it is rotated by 90 degrees.

I understood it is some device issue - it does not happen on all devices.

I am taking the picture uskng the given camera intent and save it in onActivityResult function.

I looked around but did not find a solid solution for this.

Any ideas how can find the problem and rotate it back only on "problematic" devices?

like image 547
user1136875 Avatar asked Jan 14 '12 20:01

user1136875


People also ask

How do I fix my camera rotation on my Android?

Find and turn on the "Auto-rotate" tile in the quick-setting panel. You can also go to Settings > Display > Auto-rotate screen to turn it on. Your phone screen should rotate automatically now if nothing is wrong with the sensors.

Why does my camera turn my photos sideways?

The reason your photo would appear this way is because the photo was taken that way (either with the phone sideways or upside down) and the image file itself is in this orientation. For example, if you hold your phone upright and take a photo, the photo is saved in portrait mode or "sideways".

Why do my pictures turn sideways on Samsung?

To adjust the screen rotation settings: Swipe down from the top of the screen to open the Quick settings panel. Look for the screen orientation icon. Depending on your settings, you may need to look for the Portrait, Landscape, or Auto Rotate icon.

Why does my phone turn pictures sideways?

Photos taken on smartphones, tablets and some cameras can look great on your device but appear upside down or sideways when uploaded to a post or page because the device stores the image's orientation in the EXIF metadata and not all software is able to read the metadata.


1 Answers

This is a bug based on different manufacturers settings. Some phones rotate them, some don't. see the link, it's issue #1193

http://code.google.com/p/android/issues/detail?id=1193

Also answers available to correct it - Why does an image captured using camera intent gets rotated on some devices on Android?

like image 150
Bill Gary Avatar answered Dec 30 '22 04:12

Bill Gary