@Service(value=ImageProcessor.class) public class JavaGraphicsProvider extends ImageProcessor
ImageProcessor
implementation based on the Java Abstract
Windowing Toolkit.Constructor and Description |
---|
JavaGraphicsProvider() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
flip(BufferedImage image,
int direction)
Flips an image
|
BufferedImage |
makeColorTransparent(BufferedImage image,
Color color)
Makes a
Color of an image transparent |
BufferedImage |
makeImageTranslucent(BufferedImage image,
float translucency)
Makes an image translucent.
|
BufferedImage |
resize(BufferedImage image,
int newWidth,
int newHeight)
Resizes an image
|
BufferedImage |
resizeProportional(BufferedImage image,
int newWidth,
int newHeight)
Resizes an image proportionally.
|
BufferedImage |
resizeRelative(BufferedImage image,
float resizeFactorWidth,
float resizeFactorHeight)
Resizes an image relatively to the original size.
|
BufferedImage |
resizeRelativeProportional(BufferedImage image,
float resizeFactor)
Resizes an image proportionally and relative to the original size.
|
BufferedImage |
rotate(BufferedImage image,
int angle)
Rotates an image by an angle defined in degrees.
|
makeAThumbnail
public BufferedImage makeImageTranslucent(BufferedImage image, float translucency)
ImageProcessor
makeImageTranslucent
in class ImageProcessor
public BufferedImage makeColorTransparent(BufferedImage image, Color color)
ImageProcessor
Color
of an image transparentmakeColorTransparent
in class ImageProcessor
public BufferedImage flip(BufferedImage image, int direction)
ImageProcessor
flip
in class ImageProcessor
direction
- 0 means horizontal
1 means verticalpublic BufferedImage rotate(BufferedImage image, int angle)
ImageProcessor
rotate
in class ImageProcessor
public BufferedImage resize(BufferedImage image, int newWidth, int newHeight)
ImageProcessor
resize
in class ImageProcessor
public BufferedImage resizeProportional(BufferedImage image, int newWidth, int newHeight)
ImageProcessor
resizeProportional
in class ImageProcessor
public BufferedImage resizeRelative(BufferedImage image, float resizeFactorWidth, float resizeFactorHeight)
ImageProcessor
resizeRelative
in class ImageProcessor
public BufferedImage resizeRelativeProportional(BufferedImage image, float resizeFactor)
ImageProcessor
resizeRelativeProportional
in class ImageProcessor
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.