Search code examples
androidandroid-image

taken from android camera image original resolution


This code gives me image taken from android camera ,however,its size and resolution format of the thumnail.

Bitmap photo = (Bitmap) data.getExtras().get("data"); 

How can I get the original image with the original size and resolution Thank you


Solution

  • Bitmap photo = (Bitmap) data.getExtras().get("data");
    

    this code gives you only thumnail image.To get the original image u need to use EXTERNAL_STORAGE which image saved there. (Code is something like this)

     File storageDir = Environment.getExternalStoragePublicDirectory(
                Environment.DIRECTORY_PICTURES);
    

    For more information take a look at here