fr.paris.lutece.plugins.stock.utils
Class ImageUtils
java.lang.Object
fr.paris.lutece.plugins.stock.utils.ImageUtils
public final class ImageUtils
- extends Object
Class for manipulating images
- Author:
- abataille
|
Method Summary |
static File |
createThumbnail(File fImage,
int width,
int height)
Create a thumbnail and write it into a new file prefixed by tb_
(images/lutece.jpg => images/lutece_tb.jpg) |
static File |
resizeImage(File fImage,
int maxWidth,
int maxHeight,
String newName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createThumbnail
public static File createThumbnail(File fImage,
int width,
int height)
throws IOException
- Create a thumbnail and write it into a new file prefixed by tb_
(images/lutece.jpg => images/lutece_tb.jpg)
- Parameters:
fImage - source image filewidth - max width of the thumbnailheight - the height
- Throws:
IOException - Signals that an I/O exception has occurred.
resizeImage
public static File resizeImage(File fImage,
int maxWidth,
int maxHeight,
String newName)
throws IOException
- Parameters:
fImage - source image filewidth - the max width for the imageheight - the max height for the imagenewName - the new name for the image, can be null to keep old name
- Returns:
- the image with limit dimensions
- Throws:
IOException - Signals that an I/O exception has occurred.
Copyright © 2014 Mairie de Paris. All Rights Reserved.