|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.meshcms.core.AbstractThumbnail
Field Summary | |
static java.awt.Color |
DEFAULT_BORDER_COLOR
Default color for thumbnail borders. |
Constructor Summary | |
AbstractThumbnail()
|
Method Summary | |
static java.awt.image.BufferedImage |
averageResize(java.awt.image.BufferedImage in,
int width,
int height)
Resizes an image using a simple area average (suitable to create images that are much smaller than the original). |
Path |
checkAndCreate(WebSite webSite,
Path imagePath,
java.lang.String thumbnailFileName)
Checks the current thumbnail, and creates it if not available or too old. |
protected abstract boolean |
createThumbnail(java.io.File imageFile,
java.io.File thumbnailFile)
Creates the thumbnail. Called only if needed. |
static void |
drawResizedImage(java.awt.Graphics g,
java.awt.image.BufferedImage image,
int x,
int y,
int width,
int height,
boolean highQuality)
|
abstract java.lang.String |
getSuggestedFileName()
Returns the recommended file name for the current thumbnail. |
static java.awt.image.BufferedImage |
linearResize(java.awt.image.BufferedImage in,
int width,
int height)
Resizes an image using a simple linear interpolation (suitable to resize to a size similar to the original one). |
static java.awt.image.BufferedImage |
resize(java.awt.image.BufferedImage in,
int width,
int height)
Resizes an image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.awt.Color DEFAULT_BORDER_COLOR
Constructor Detail |
public AbstractThumbnail()
Method Detail |
public abstract java.lang.String getSuggestedFileName()
protected abstract boolean createThumbnail(java.io.File imageFile, java.io.File thumbnailFile)
imageFile
- source image file to create thumbnail fromthumbnailFile
- destination file
public Path checkAndCreate(WebSite webSite, Path imagePath, java.lang.String thumbnailFileName)
public static void drawResizedImage(java.awt.Graphics g, java.awt.image.BufferedImage image, int x, int y, int width, int height, boolean highQuality)
public static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage in, int width, int height)
public static java.awt.image.BufferedImage linearResize(java.awt.image.BufferedImage in, int width, int height)
public static java.awt.image.BufferedImage averageResize(java.awt.image.BufferedImage in, int width, int height)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |