用java 合并两张tif格式的图片或多张 高手救我

解决方案 »

  1.   

    java这方面是不好做的!你何必好了再调用吧!
                File _file = new File(imagePath); // 读入文件
                Image src = javax.imageio.ImageIO.read(_file); // 构造Image对象 
                int wideth = src.getWidth(null); // 得到源图宽 
                int height = src.getHeight(null); // 得到源图长 
                BufferedImage tag = new BufferedImage(wideth, height, BufferedImage.TYPE_INT_RGB);
                tag.getGraphics().drawImage(src, 0, 0, wideth, height, null); // 绘制缩小后的图 
                ImageIO.write(tag, "JPEG", response.getOutputStream());