| java.lang.Object com.methodhead.shim.Thumbnailer
Thumbnailer | public class Thumbnailer (Code) | | Creates thumbnails of popular image formats.
|
Field Summary | |
final public static int | THUMB_HEIGHT Maximum width of the thumbnail. | final public static float | THUMB_QUALITY Thumbnail quality in a range between 0.0 and 1.0. | final public static int | THUMB_WIDTH Maximum height of the thumbnail. |
Method Summary | |
public void | syncDir(File src, File dest) Creates thumbnails for any JPG, GIF, and PNG file in src in
dest. | public static void | thumbnail(File src, File dest) Creates a thumbnail of src in the file specified by
dest. |
THUMB_HEIGHT | final public static int THUMB_HEIGHT(Code) | | Maximum width of the thumbnail.
|
THUMB_QUALITY | final public static float THUMB_QUALITY(Code) | | Thumbnail quality in a range between 0.0 and 1.0.
|
THUMB_WIDTH | final public static int THUMB_WIDTH(Code) | | Maximum height of the thumbnail.
|
syncDir | public void syncDir(File src, File dest)(Code) | | Creates thumbnails for any JPG, GIF, and PNG file in src in
dest. If a thumbnail already exists in dest, it is
updated if the file in src is newer. The thumbnails are JPEG's,
so ".jpg" is appended to the filename of each thumbnail. Some images
cannot be processed properly and the resulting IllegalArgumentException is
caught and logged, but otherwise ignored; no thumbnail file is created in
this case.
|
thumbnail | public static void thumbnail(File src, File dest)(Code) | | Creates a thumbnail of src in the file specified by
dest. The thumbnail is in JPEG format. It maintains the aspect
ratio of the source image and is contrained by
Thumbnailer.THUMB_WIDTHTHUMB_WIDTH and
Thumbnailer.THUMB_HEIGHT THUMB_HEIGHT .
|
|
|