I have a big memory problem:
// in sourceImage is a big JPEG previously loaded Matrix mat = new Matrix(); mat.postRotate(90); Bitmap rotatedImage = Bitmap.createBitmap(sourceImage, 0, 0, sourceImage.getWidth(), sourceImage.getHeight(), mat, true);
I always run this code, my application crashes and says: "VM will not allow us to allocate xxxxxx bytes"
Can you help me?
Edit:
I saw a lot of similar questions here, but I donโt know how to process the sourceImage before rotating it ... (because the second instance is large in size to hold it at the same time)
Thanks.
source share