我正在尝试在画布上绘制位图。问题是位图有透明部分,我希望只有位图可见,但是应该透明的部分却被涂成黑色。为什么会这样?
这是我的代码:
Canvas canvas1 = new Canvas(tempBitmap1);
Bitmap faceBitmapScaled = Bitmap.createScaledBitmap(FilterSystem.selectedImage, (int)face.getWidth() - 15, (int)face.getHeight() - 15, false);
canvas1.drawBitmap(faceBitmapScaled, null, new Rect(left, top, right, bottom), null);