download | JThumbnailer | ImageResizer | feedback | juniverse.org |
|
j-graphic-tools (jgt) is a easy to use Java-API and a collection of usefull tools for graphic manipulation. It is
released under a Apache-styled license. At the moment only jpg images are supported, other graphic formats will
follow. jgt includes the following tools/libs:
JThumbnailer JThumbnailer is a commandline tool. You can start it with the following command: java org.juniverse.jgraphictools.JThumbnailer <path_to_properties_file> Make sure that jgraphictools.jar and jimiproclasses.jar are in your classpath! In the specified properties file, you need to include the following attributes:
You can setup the layout of your html page with every tool you like. Simple insert an tag like <images/> on that location in your page, where the thumbnails should be insert. Specifiy the tag in the IMAGE_TAG property. If you specify only one of the values TARGET_WIDTH and TARGET_HEIGHT, the other one will be computed by the JThumbnailer (set the second parameter simple to -1). ^ top ImageResizer As Java-API you can use the ImageResizer like this: If you like to resize a single graphic: import org.juniverse.jgraphictools.ImageResizer; ImageResizer.resize("C:/source.jpg", "C:/target.jpg", 800, 600); If you like to resize all graphics in an directory: import org.juniverse.jgraphictools.ImageResizer; ImageResizer ir = new ImageResizer(); ir.setSourceDir("C:/source"); ir.setTargetDir("C:/target"); ir.setTargetWidth(640); ir.setTargetHeight(480); ir.resize(); As commandline tool, you use it like the JThumbnailer: java org.juniverse.jgraphictools.ImageResizer <path_to_properties_file> Make sure that jgraphictools.jar and jimiproclasses.jar are in your classpath! In the specified properties file, you need to include the following attributes:
If you specify only one of the values TARGET_WIDTH and TARGET_HEIGHT, the other one will be computed by the ImageResizer (set the second parameter simple to -1). ^ top Feedback Any feedback is welcome! Please write to juniverse AT users.sourceforge.net. ^ top |
|