我有两个图像,我想将一个位图图像完全保存在另一个位图图像存在的同一点上,我还使用手势移动图像。
public Bitmap combineImages(Bitmap ScaledBitmap, Bitmap bit) {
int X = bit.getWidth();
int Y = bit.getHeight();
Scaled_X = ScaledBitmap.getWidth();
scaled_Y = ScaledBitmap.getHeight();
System.out.println("Combined Images");
System.out.println("Bit :" + X + "/t" + Y);
System.out.println("SCaled_Bitmap :" + Scaled_X + "\t" + scaled_Y);
overlaybitmap = Bitmap.createBitmap(ScaledBitmap.getWidth(),
ScaledBitmap.getHeight(), ScaledBitmap.getConfig());
Canvas canvas = new Canvas(overlaybitmap);
canvas.drawBitmap(ScaledBitmap, new Matrix(), null);
canvas.drawBitmap(bit, new Matrix(), null);
return overlaybitmap;
}
任何帮助将不胜感激。