Reputation: 31
I am getting an outofmemory error in spite of using softreferences and using the inSample size as the options. I get the error on calling createScaledBitmap. Any kind of pointers is highly appreciated.
Upvotes: 3
Views: 1192
Reputation: 761
It would comsume a lot of memory if you use Bitmap.createScaledBitmap and scale bitmaps to huge size. Instead, try to keep your orginal bitmap and a scaled Matrix. Call Canvas.drawBitmap(bitmap, matrix, paint) to display it. Leading to lower image quality but better than crashing.
Upvotes: 2