android.graphics.Matrix缩放图片文件: int bmpWidth = bitmap.getWidth(); int bmpHeight = bitmap.getHeight(); // 要缩小的比例 0.8 float scale = 0.8; // 1.2 scaleWidth = scaleWidth * scale; // scaleWidth初始值为1.0f scaleHeight = scaleHeight * scale; // scaleHeight初始值为1.0f Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); Bitmap resizeBmp = Bitmap.createBitmap(bitmap, 0, 0, bmpWidth, bmpHeight, matrix, true); android.graphics.Matrix旋转图片文件: int bmpWidth = bitmap.getWidth(); int bmpHeight = bitmap.getHeight(); Matrix matrix = new Matrix(); matrix.postRotate(degree); // degree为: 正数表示向右(顺时针), 负数表示向左(逆时针) Bitmap resizeBmp = Bitmap.createBitmap(bitmap, 0, 0, bmpWidth, bmpHeight, matrix, true);