I want to rotate an ImageView image. Here is my code:\[code\]Matrix mat = new Matrix();mat.preRotate(90, ivImage.getWidth()/2, ivImage.getHeight()/2);ivImage.setScaleType(ScaleType.MATRIX);ivImage.setImageMatrix(mat);\[/code\]but when I click on the rotate button, not only the image rotates, but it is scaled too, because the bitmap is larger then the \[code\]ImageView\[/code\].I know I can use\[code\]b = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), mat, true);ivImage.setImageBitmap(b);\[/code\]but this is noticeably slower, and has some lag.So my question is: how to rotate the image without being scaled and without recreating the bitmap?