Reputation: 551
I showing image in imageview which is captured by Intent method of android camera. I have been tested this code over Samsung Nexus but when i tested over Nexus S, image is shwoing rotated by itself on 270 degree. I have been go through these links
ACTION_IMAGE_CAPTURE orientation problem on Nexus S and Samsung Galaxy S I9000
Camera/picture orientation in Android
http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setRotation%28int%29
Picture orientation from gallery/camera intent
But this code
ExifInterface exif = new ExifInterface("filepath");
exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
always giving 0 in both devices. Please tell i would i know that image is showing in which angle in particular device while showing so that it will be applied for all devices, once i will get its angle i will rotate by myself. Thanks in advance.
Upvotes: 0
Views: 915
Reputation: 7166
what happens if you:
ExifInterface exif = new ExifInterface("filepath");
exif.getAttribute(ExifInterface.TAG_ORIENTATION);
?
Upvotes: 0
Reputation: 577
I'm not 100% sure I understand what you're looking for, but if you want the orientation of the device, check out this question:
Check orientation on Android phone
Upvotes: 0