I want to find out the EXIF rotation of an picture. When the picture is displayed in the gallery, it isn't rotated, but after loading the image with the EXIF information 'rotate left' the picture is displayed rotated.
Now i want to ask the user, if he wants to use the rotated image or the original.
I get an Uri to that method and store it an in Bitmap
InputStream inputStream = PaintroidApplication.applicationContext.getContentResolver().openInputStream(bitmapUri);
BitmapFactory.decodeStream(inputStream, null, options);
inputStream.close();
Now i want to use the ExifInterface to determinate the rotation, but ExifInterface requires a path:
ExifInterface exif = new ExifInterface(bitmapUri.getPath());
rotation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
Now i have a problem with the path and logcat shows the following message:
E/JHEAD﹕ can't open '/document/image:15035'
How can i solve this problem or is there an other solution to find out the EXIF information?