Package org.jppf.utils
Class ThumbnailGenerator
java.lang.Object
org.jppf.utils.ThumbnailGenerator
Instances of this class generate thumbnails from a set of images stored in a file system folder.
- Author:
- Laurent Cohen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classFile filter that only accepts files with specified extensions. -
Constructor Summary
ConstructorsConstructorDescriptionThumbnailGenerator(String path, int width, int height) Initialize this thumbnail generator with the specified root dir, width and height.ThumbnailGenerator(String path, int width, int height, int rowLength) Initialize this thumbnail generator with the specified root dir, width, height and default number of thumbnails per row.ThumbnailGenerator(String path, int width, int height, String includePath, int rowLength) Initialize this thumbnail generator with the specified root dir, width, height and default number of thumbnails per row. -
Method Summary
-
Constructor Details
-
ThumbnailGenerator
Initialize this thumbnail generator with the specified root dir, width and height.- Parameters:
path- the path to the directory in which to find the images.width- the width of the generated thumbnails.height- the height of the generated thumbnails.
-
ThumbnailGenerator
Initialize this thumbnail generator with the specified root dir, width, height and default number of thumbnails per row.- Parameters:
path- the path to the directory in which to find the images.width- the width of the generated thumbnails.height- the height of the generated thumbnails.rowLength- the number of thumbnails per row.
-
ThumbnailGenerator
Initialize this thumbnail generator with the specified root dir, width, height and default number of thumbnails per row.- Parameters:
path- the path to the directory in which to find the images.width- the width of the generated thumbnails.height- the height of the generated thumbnails.includePath- the generated file to include in the screenshots php page.rowLength- the number of thumbnails per row..
-
-
Method Details
-
generate
Generate all thumbnails.- Throws:
Exception- if an IO error is raised.
-
main
Perform the thumbnail generation.- Parameters:
args- contains in that order: root path, thumbnail width, thumbnail height.
-