...å¦ä½æåå°å¾çä¼ å°åå°åºè¯¥ä¼å§ ä¸ä¼ç¾åº¦ä¸ demoå¾å¤
è³äº å¾çåæä¹å¾ç®å
import java.io.File;
import
java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
public class test
{
public static void main(String args[])
{
try
{
//读å第ä¸å¼ å¾ç
File fileOne = new
File("D:\\M114317.png");
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("D:\\M114320.png");
BufferedImage ImageTwo = ImageIO.read(fileTwo);
int[] ImageArrayTwo
= new int[width*height];
ImageArrayTwo =
ImageTwo.getRGB(0,0,width,height,ImageArrayTwo,0,width);
//çææ°å¾ç
BufferedImage ImageNew = new
BufferedImage(width*2,height,BufferedImage.TYPE_INT_RGB);
ImageNew.setRGB(0,0,width,height,ImageArrayOne,0,width);//设置左åé¨åçRGB
ImageNew.setRGB(width,0,width,height,ImageArrayTwo,0,width);//设置å³åé¨åçRGB
File outFile = new File("d:\\out.png");
ImageIO.write(ImageNew, "png",
outFile);//åå¾ç
}
catch(Exception e)
{
e.printStackTrace();
}
}
追é®æ说çæ¯ç¨springæ¡æ¶ ä¸æ¯sturts2
追çæäº æ没ç¨æ¡æ¶ æåºæ¬çåå°java代ç ä½ åæå¾ç ç¨java代ç åæ¡æ¶æä»ä¹å
³ç³»...
顶å¤ä½ ä¸ä¼ é¨åæç¹åºå« ä½å°åå°è·å å°ç é½æ¯ä¸¤å¼ å¾ç
å¾çä¸ä¼ é¨å ä½ è¦æ¯ä¸ä¼èªå·±ç¾åº¦ å¾ç®å