该版本包含bug修复和增加一些小的功能,修复了空指针异常,增加了一个图像过滤器用来创建透明的缩略图。
Thumbnailator 是一个用来生成图像缩略图的 Java 类库,通过很简单的代码即可生成图片缩略图,也可直接对一整个目录的图片生成缩略图。
What is Thumbnailator?
Thumbnailator is a thumbnail generation library for Java.
Why Thumbnailator?
Making thumbnails in Java can be a fairly difficult task.
Learning how to use the Image I/O API, Java 2D API, image processing, image scaling techniques, ... but fear not! Thumbnailator will take care of all those things for you!
How simple is Thumbnailator?
Thumbnailator's fluent interface can be used to perform fairly complicated thumbnail processing task in one simple step.
For example, creating ">JPEG thumbnails of image files in a directory, all resized to a maximum dimension of 640 pixels by 480 pixels while preserving the aspect ratio of the original image can be performed by the following:
Thumbnails.of(new File("path/to/directory").listFiles())
.size(640, 480)
.outputFormat("jpg")
.toFiles(Rename.PREFIX_DOT_THUMBNAIL);
The fluent interface provided by the Thumbnailator simplifies the task of making thumbnails into a single method call!
No need to access the Image I/O API and manually manipulating BufferedImages through Graphics2D objects. Thumbnailator does all of that for you.
Thumbnailator v0.2.9下载地址:http://code.google.com/p/thumbnailator/downloads/list
Thumbnailator-0.2.9-javadoc.zip Thumbnailator-0.2.9-src.jar Thumbnailator-0.2.9.jar