public final class ImageUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
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) |
public static File createThumbnail(File fImage, int width, int height) throws IOException
fImage - source image filewidth - max width of the thumbnailheight - the heightIOException - Signals that an I/O exception has occurred.public static File resizeImage(File fImage, int maxWidth, int maxHeight, String newName) throws IOException
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 nameIOException - Signals that an I/O exception has occurred.Copyright © 2021 City of Paris. All rights reserved.