两张图片合成一张图片(竖屏)
public static Bitmap add2Bitmap_port(Bitmap first, Bitmap second) {
if (first == null || second == null) {
return null;
}
int height = first.getHeight() + second.getHeight();
int width = Math.max(first.getWidth(), second.getWidth());
Bitmap result = Bitmap.createBitmap(width, height, Config.ARGB_8888);
Canvas canvas = new Canvas(result);
canvas.drawBitmap(first, 0, 0, null);
canvas.drawBitmap(second, 0, first.getHeight(), null);
return result;
}
版权声明:本文为wuwen__zhousi原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。