用到的Jar:Thumbnails
查看下载 地址:http://code.google.com/p/thumbnailator/
上个原图:
File originalFile = new File("C:\\b.jpg");
File thumbnailFile = new File("C:\\thumbnail.jpg");
try {
Thumbnails.of(originalFile).size(240, 180).outputFormat("jpg").toFile(thumbnailFile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}