If you have a Uri and you need the Bitmap
, you could theoretically do this
Bitmap troublinglyLargeBmp =
MediaStore.Images.Media.getBitmap(
See the Android guide to handling large bitmaps.
Specifically this section:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), R.id.myimage, options);
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
String imageType = options.outMimeType;
EDIT
In your case, you'll replace the decodeResource
line with:
BitmapFactory.decodeFileDescriptor(fileDescriptor.getFileDescriptor(), null, options);