info.aduna.graphics.image
Class ImageTransformer
java.lang.Object
info.aduna.graphics.image.ImageTransformer
public class ImageTransformer
- extends Object
An ImageTransformer can create scaled, gray scale and color-filtered versions
of Images.
|
Method Summary |
static BufferedImage |
createGrayScaledImage(BufferedImage image)
|
static BufferedImage |
createGrayScaledImage(Image image,
int type)
Returns a gray-scaled BufferedImage based on the specified Image, with
the specified type. |
static BufferedImage |
createMonotoneImage(BufferedImage image)
|
static BufferedImage |
createMonotoneImage(Image image,
int type)
|
static BufferedImage |
createScaledImage(Image img,
int type,
double scale)
|
static BufferedImage |
createShadowImage(BufferedImage image,
Color shadowColor)
|
static BufferedImage |
createShadowImage(Image image,
int type,
Color shadowColor)
Returns a BufferedImage representing the shadow of the specified Image,
with the specified type. |
static BufferedImage |
toBufferedImage(Image image,
int type)
Returns a BufferedImage with the specified type on which the specified
Image has been drawn. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCALED_IMAGE_BACKGROUND_COLOR
public static final Color SCALED_IMAGE_BACKGROUND_COLOR
ImageTransformer
public ImageTransformer()
createScaledImage
public static BufferedImage createScaledImage(Image img,
int type,
double scale)
createGrayScaledImage
public static BufferedImage createGrayScaledImage(Image image,
int type)
- Returns a gray-scaled BufferedImage based on the specified Image, with
the specified type. The type must be a valid BufferedImage type.
createGrayScaledImage
public static BufferedImage createGrayScaledImage(BufferedImage image)
createShadowImage
public static BufferedImage createShadowImage(Image image,
int type,
Color shadowColor)
- Returns a BufferedImage representing the shadow of the specified Image,
with the specified type. The type must be a valid BufferedImage type. The
operation works as follows: all pixels will have the specified RGB color,
but the alpha value will be copied from the corresponding pixel in the
specified image. Note that a white pixel will also be transformed in a
shadow pixel, only purely transparent pixels will also be fully
transparent in the result image.
createShadowImage
public static BufferedImage createShadowImage(BufferedImage image,
Color shadowColor)
createMonotoneImage
public static BufferedImage createMonotoneImage(Image image,
int type)
createMonotoneImage
public static BufferedImage createMonotoneImage(BufferedImage image)
toBufferedImage
public static BufferedImage toBufferedImage(Image image,
int type)
- Returns a BufferedImage with the specified type on which the specified
Image has been drawn.
Copyright © 1997-2008 Aduna. All Rights Reserved.