{ Bitmap bit=Shrinkmethod(arrpath1[position], 100, 100);
//This reduce the size of image in 1kb size so u can also consider VM nativeheap memory
iv.setImageBitmap(bit);//ImageView Obj.
}
//To reduce the byte size of image in program
//user defined method to reduce size of image without reducing the quality of img.
Bitmap Shrinkmethod(String file,int width,int height){
BitmapFactory.Options bitopt=new BitmapFactory.Options();
bitopt.inJustDecodeBounds=true;
Bitmap bit=BitmapFactory.decodeFile(file, bitopt);
int h=(int) Math.ceil(bitopt.outHeight/(float)height);
int w=(int) Math.ceil(bitopt.outWidth/(float)width);
if(h>1 || w>1){
if(h>w){
bitopt.inSampleSize=h;
}else{
bitopt.inSampleSize=w;
}
}
bitopt.inJustDecodeBounds=false;
bit=BitmapFactory.decodeFile(file, bitopt);
return bit;
}
//Try to upload ur project code and idea so that like u and me can get that to develop more android application..
Regard,
pranav