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