天天看点

Android bitmap旋转、平移简单几何变换很方便

1.顺时针旋转90度

byte[] tmp = os.toByteArray();
Bitmap bmpt = BitmapFactory.decodeByteArray(tmp, ,tmp.length);
Matrix matrix = new Matrix();
matrix.postRotate();
Bitmap bmp = Bitmap.createBitmap(bmpt, ,,bmpt.getWidth(),  bmpt.getHeight(), matrix, false);