public abstract class ImageProcessor extends Object
java.awt.image.BufferedImage
. BufferedImage is an accessible
buffer of image data (pixels and their RGB colors).Constructor and Description |
---|
ImageProcessor() |
Modifier and Type | Method and Description |
---|---|
abstract BufferedImage |
flip(BufferedImage image,
int direction)
Flips an image
|
BufferedImage |
makeAThumbnail(BufferedImage image,
int width,
int height)
Create a thumbnail of the image.
|
abstract BufferedImage |
makeColorTransparent(BufferedImage image,
Color color)
Makes a
Color of an image transparent |
abstract BufferedImage |
makeImageTranslucent(BufferedImage image,
float translucency)
Makes an image translucent.
|
abstract BufferedImage |
resize(BufferedImage image,
int newWidth,
int newHeight)
Resizes an image
|
abstract BufferedImage |
resizeProportional(BufferedImage image,
int newWidth,
int newHeight)
Resizes an image proportionally.
|
abstract BufferedImage |
resizeRelative(BufferedImage image,
float resizeFactorWidth,
float resizeFactorHeight)
Resizes an image relatively to the original size.
|
abstract BufferedImage |
resizeRelativeProportional(BufferedImage image,
float resizeFactor)
Resizes an image proportionally and relative to the original size.
|
abstract BufferedImage |
rotate(BufferedImage image,
int angle)
Rotates an image by an angle defined in degrees.
|
public abstract BufferedImage makeImageTranslucent(BufferedImage image, float translucency)
image
- translucency
- public abstract BufferedImage makeColorTransparent(BufferedImage image, Color color)
Color
of an image transparentimage
- color
- public abstract BufferedImage flip(BufferedImage image, int direction)
image
- direction
- 0 means horizontal
1 means verticalpublic abstract BufferedImage rotate(BufferedImage image, int angle)
image
- angle
- public abstract BufferedImage resize(BufferedImage image, int newWidth, int newHeight)
image
- newWidth
- newHeight
- public abstract BufferedImage resizeProportional(BufferedImage image, int newWidth, int newHeight)
image
- newWidth
- newHeight
- public abstract BufferedImage resizeRelative(BufferedImage image, float resizeFactorWidth, float resizeFactorHeight)
image
- resizeFactorWidth
- resizeFactorHeight
- public abstract BufferedImage resizeRelativeProportional(BufferedImage image, float resizeFactor)
image
- resizeFactor
- public BufferedImage makeAThumbnail(BufferedImage image, int width, int height)
height
and
width
respectively. If image is already smaller or equals
width
x height
image is returned without
transformation.image
- The image from which the thumbnails is derived.width
- The maximum width of the thumbnailheight
- The maximum height of the thumbnailCopyright © 2014 The Apache Software Foundation. All Rights Reserved.