import java.io.*;
import net.coobird.thumbnailator.*;
public class Thumbnailator5
{
public static void main(String args[])
throws IOException
{
Thumbnails.of(new File("SF2.JPG"))
.size(150, 150)
.keepAspectRatio(false) // デフォルトはtrue
.toFile(new File("SF_KAR.JPG"));
}
}
元画像(SF.JPG)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe_cXFShQmsC2cRQ-TUF8MjSBQUQcPseT90czwd3l_6tWX6vVWHJuHoVRP7VR7xL0I_9SSlRrLeHbrMyQnywa7D342UndgDyXp181a1jVxg8gRCEtPL7nj6bYuvSr5-MgPGmG5/s320/sf2.jpg)
出力画像(SF_KAR.JPG)
動作環境
JDK6 Update21, Thumbnailator 0.24
関連情報
Thumbnailatorのwebsite
http://code.google.com/p/thumbnailator/
No comments:
Post a Comment