How to resolve memory issue while scaling / roating a bitmap in android?
<p>I want to zoom and roate a image in an Android activity. 
I am doing it as follows </p>

<pre><code>        Matrix matrix = new Matrix();
        matrix.postRotate(rotation);
        matrix.postScale(zoomScale,zoomScale);
        Bitmap scaledBitmap = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true);
        imageView.setImageBitmap(scaledBitmap);
</code></pre>

<p>but it gives me a memory error after a few rotations and zooming.
How can i resolve this ? Most application do it pretty efficiently on a daily basis.</p>
