Bitmap bitmapSrc = BitmapFactory.decodeResource(getResources(), R.drawable.dog); Bitmap bitmapCopy = Bitmap.createBitmap(bitmapSrc.getWidth(), bitmapSrc.getHeight(), bitmapSrc.getConfig()); Paint paint = new Paint(); Canvas canvas = new Canvas(bitmapCopy); Matrix matrix = new Matrix(); //图片缩放 //matrix.postScale(0.5f, 0.5f); //图片旋转 //matrix.postRotate(20f,bitmapCopy.getWidth()/2,bitmapCopy.getHeight()/2); //图片平移 //matrix.postTranslate(100, 150); //图片镜像 //matrix.setScale(-1.0f,1); //matrix.postTranslate(bitmapCopy.getWidth(),0); //图片倒影 matrix.setScale(1.0f,-1f); matrix.postTranslate(0, bitmapCopy.getHeight()); canvas.drawBitmap(bitmapSrc,matrix,paint); iv.setImageBitmap(bitmapCopy);