TAGS :Viewed: 1 - Published at: a few seconds ago

[ Is it possible to get the BitmapFactory.Options instance associated with the bitmap returned by data.getExtras().get("data"); ]

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {  
    if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK) {  
        Bitmap photo = (Bitmap) data.getExtras().get("data"); 
    }  
} 

how can i get the BitmapFactory.Options instance associated with bitmap (photo).

Answer 1


why photo.getWidth() and photo.getHeight() does not work for you?

If you have Bitmap under "data" key, you should get Bitmap reference and all available methods will be available.