I'm trying to set a bitmap's rotation using a matrix but I am having some trouble here.
Does anyone know how to rotate a bitmap?? I am so confused why this would give out of memory errors. My code is plain and simple:
thisRotation = Math.toDegrees(Math.atan2(
(fingery1 - thisRectf.centerY()),
(fingerx1 - thisRectf.centerX()))));
matrix.setRotate(thisRotation, thisRectf.centerX(),
thisRectf.centerY());
Bitmap.createBitmap(thisBitmap, 0, 0, thisBitmap.getWidth(),
thisBitmap.getHeight(), matrix, true);
I have used google and apparently this is not an easy fix? My image is very small (9 kb) and i've tried lowering it to 900 bytes but it still causes gc.