我试图在创建最终位图之前在单个操作中进行缩放和旋转但是preRotate,postConcat似乎不起作用.
Bitmap bmp = ... original image ...
Matrix m = new Matrix()
m.setScale(x, y);
m.preRotate(degrees, (float) width / 2, (float) height / 2);
Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), m, true);
Run Code Online (Sandbox Code Playgroud)
它只适用比例而不是旋转.