简体   繁体   中英

Why Android Studio Change Image Rotation After Select Image

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();
        }

    }

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM