public class DefaultThumbnailGenerator extends Object implements ThumbnailGenerator
| Constructor and Description |
|---|
DefaultThumbnailGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected BufferedImage |
createCompatibleImage(BufferedImage image,
int width,
int height)
Creates the compatible image.
|
BufferedImage |
createThumbnail(BufferedImage image,
int newSize)
Creates the thumbnail.
|
BufferedImage |
createThumbnail(BufferedImage image,
int newWidth,
int newHeight)
Returns a thumbnail of a source image.
|
protected GraphicsConfiguration |
getGraphicsConfiguration()
Gets the graphics configuration.
|
protected BufferedImage |
incrementalStep(BufferedImage source,
int targetWidth,
int targetHeight)
Renders an image taking an incremental step (dividing by 2)
|
protected boolean |
isHeadless()
Checks if is headless.
|
public BufferedImage createThumbnail(BufferedImage image, int newSize)
createThumbnail in interface ThumbnailGeneratorimage - the imagenewSize - the new sizeprotected BufferedImage incrementalStep(BufferedImage source, int targetWidth, int targetHeight)
source - the sourcetargetWidth - the target widthtargetHeight - the target heightpublic BufferedImage createThumbnail(BufferedImage image, int newWidth, int newHeight)
Returns a thumbnail of a source image.
createThumbnail in interface ThumbnailGeneratorimage - the source imagenewWidth - the width of the thumbnailnewHeight - the height of the thumbnailBufferedImage containing a thumbnail of imageprotected boolean isHeadless()
protected BufferedImage createCompatibleImage(BufferedImage image, int width, int height)
image - the imagewidth - the widthheight - the heightprotected GraphicsConfiguration getGraphicsConfiguration()
Copyright © 2017 SAP SE. All Rights Reserved.