//读取第一张图片
File fileOne = new File(firstSrcImagePath);
BufferedImage imageOne = ImageIO.read(fileOne);
int width = imageOne.getWidth();//图片宽度
int height = imageOne.getHeight();//图片高度
//从图片中读取RGB
int[] imageArrayOne = new int[width*height];
imageArrayOne = imageOne.getRGB(0,0,width,height,imageArrayOne,0,width);
//对第二张图片做相同的处理
File fileTwo = new File(secondSrcImagePath);
BufferedImage imageTwo = ImageIO.read(fileTwo);
int width2 = imageTwo.getWidth();
int height2 = imageTwo.getHeight();
int[] ImageArrayTwo = new int[width2*height2];
ImageArrayTwo = imageTwo.getRGB(0,0,width,height,ImageArrayTwo,0,width);
//ImageArrayTwo = imageTwo.getRGB(0,0,width2,height2,ImageArrayTwo,0,width2);
//生成新图片
//int height3 = (height>height2 || height==height2)?height:height2;
BufferedImage imageNew = new BufferedImage(width*2,height,BufferedImage.TYPE_INT_RGB);
//BufferedImage imageNew = new BufferedImage(width+width2,height3,BufferedImage.TYPE_INT_RGB);
imageNew.setRGB(0,0,width,height,imageArrayOne,0,width);//设置左半部分的RGB
imageNew.setRGB(width,0,width,height,ImageArrayTwo,0,width);//设置右半部分的RGB
//imageNew.setRGB(width,0,width2,height2,ImageArrayTwo,0,width2);//设置右半部分的RGB
File outFile = new File(toPath);
ImageIO.write(imageNew, imageFormat, outFile);//写图片
这需要用代码写吗,不是不哭里面直接处理吗
布局里面处理,不可以?
授人予鱼不如授人予鱼啊
两层div结构
给外层div设置背景图片为A,内层div设置背景图片为B
给内层div设置相对位置,弥补空白
把这写成js做粗来...