2013-12-11 144 views

回答

0

使用矩阵旋转。

Matrix matrix = new Matrix(); 
matrix.postRotate(orientation); 
Bitmap rotated = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix, true); 
+0

请您详细解释一下..? –

+0

src是源位图。方向是旋转角度。因此,matrix.postRotate(90)会将原始位图旋转90度。 – Shashika