I’m actually getting this error on method Load image inside it i’m doing
i set options size to:
bmOptions.inSampleSize = 1;
the method in which the error points line decodeStream()..
private Bitmap LoadImage(String URL, BitmapFactory.Options options) {
Bitmap bitmap = null;
InputStream in = null;
try {
in = OpenHttpConnection(URL);
bitmap = BitmapFactory.decodeStream(in, null, options);
in.close();
} catch (IOException e1) {
return null;
}
return bitmap;
}
E/dalvikvm-heap(8627): Out of memory on a 3001616-byte allocation. at decodeStream() at loadImage()
This class scales an image in a memory effecient way to a precise size, it also does some auto rotation, you might want to disable that or pass in the angle. Is based on post here: http://zerocredibility.wordpress.com/2011/01/27/android-bitmap-scaling/