Use this class to scale down your bitmap to a smaller required size before applying it in the image view.
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
class BitmapLoader
{
public static int getScale(int originalWidth,int originalHeight,
final int requiredWidth,final int requiredHeight)
{
//a scale of 1 means the original dimensions
//of the image are maintained
int scale=1;
//calculate scale only if the height or width of
//the image exceeds the required value.
if((originalWidth>requiredWidth) || (originalHeight>requiredHeight))
{
//calculate scale with respect to
//the smaller dimension
if(originalWidth
Then from your activity, call
Bitmap reqBitmap = loadBitmap(String filePath,int requiredWidth,int requiredHeight)
method of this class providing the filepath of the bitmap obtained from the sd card, and setting the requiredWidth and requiredHeight to the dimensions you wish to scale the bitmap to. Now use the reqBitmap.