由网友(呐谁、咱娶你)分享简介:您好我需要使用两个图像文件DRM图像文件。原本我是使用BufferedImage类,但是Android不支持的BufferedImage。HelloI need to make DRM Image file using two image file.originally I was use bufferedI...
您好 我需要使用两个图像文件DRM图像文件。 原本我是使用BufferedImage类,但是Android不支持的BufferedImage。
Hello I need to make DRM Image file using two image file. originally I was use bufferedImage class, but android is not support bufferedImage.
所以请帮助我。如何组合两个图像中的android?
so please help me. how to compose two image in android?
推荐答案
您可以做,如果你将两张图像。假设BMP1是更大的一个(被保护),和BMP2的标记:
You can do that if you overlay two images. Suppose that bmp1 is bigger one (to be protected), and bmp2 is marker:
private Bitmap overlayMark(Bitmap bmp1, Bitmap bmp2)
{
Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig());
Canvas canvas = new Canvas(bmOverlay);
canvas.drawBitmap(bmp1, 0, 0, null);
canvas.drawBitmap(bmp2, distanceLeft, distanceTop, null);
return bmOverlay;
}
distanceLeft
和 distanceTop
定义标记的位置。
distanceLeft
and distanceTop
define position of the marker.
相关推荐
最新文章