0

i have Note 8 and i want to test my app on my phone. I click my imageview then open gallery and i select photo (photo from Note's camera) then photo is rotating right. but if i select other photo from any website, not problem.

i am sory for my english :

    if (requestCode==1 &&resultCode==RESULT_OK &&data!=null){
        Uri imageUri = data.getData();

        try {
            imageBitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),imageUri);
            imageViewSignUp.setImageBitmap(imageBitmap);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
Onur
  • 318
  • 4
  • 12
  • 1
    Can you, just in case, add the ImageView xml to your question? Are there any animations that may affect that ImageView? Is there an orientation transition (e.g. gallery is portrait, your activity is landscape) ? – Anhayt Ananun Dec 26 '18 at 20:58
  • i dont have anımatiom or different sometthing. I just put imageview and i used it – Onur Dec 26 '18 at 21:21

1 Answers1

1

Propably becasue Your application is not taking under consideration image exif.

Android Image Resizing and Preserving EXIF data (Orientation, Rotation, etc)

DawidJ
  • 1,245
  • 12
  • 19
  • Image exif in Your case is information about natural image rotation which is applied to photo by your standard gallery app. Your application is not appliying exif rotation to image which You are displaying that's why it is rotated/displayed differently that in normal gallery app. If You still don't understand this, You should read more about exif. – DawidJ Dec 27 '18 at 07:59