package com.yin.text;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
/**
* 把两张图片合并
* @version 2018-2-27 上午11:12:09
*
*/
public class Picture1
{
private Graphics2D g = null;
/**
* 导入本地图片到缓冲区
*/
public BufferedImage loadImageLocal(String imgName) {
try {
return ImageIO.read(new File(imgName));
} catch (IOException e) {
System.out.println(e.getMessage());
}
return null;
}
public BufferedImage modifyImagetogeter(BufferedImage b, BufferedImage d) {
try {
int w = b.getWidth();
int h = b.getHeight();
g = d.createGraphics();
g.drawI