|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.ogcwebservices.wpvs.utils.ImageUtils
public class ImageUtils
Little utility class responsible for filtering an image and making it
transparent based on an array of colors considered to be transparent.
Users of this class initalize an object with a non-null Color
array
that represents colors, which are supposed to be completely transparent.
By calling #filter( Image )
, the colors found in image are substituted
by transparent pixels.
Nested Class Summary | |
---|---|
class |
ImageUtils.ColorsToTransparentFilter
An RGBImageFilter to substitute all input colors by a completely
transparent one. |
(package private) class |
ImageUtils.TransparentImageFilter
The TransparentImageFilter class filters an RGB-Pixel with a transparency. |
Constructor Summary | |
---|---|
ImageUtils()
Creates a Imagefilter which makes an image transparent. |
|
ImageUtils(java.awt.Color[] transparentColors)
Creates a new ImageUtil object. |
Method Summary | |
---|---|
java.awt.image.BufferedImage |
ensureRGBAImage(java.awt.image.BufferedImage image)
Checks if the type of img is BufferedImage.TYPE_INT_ARGB
and if is not, create a new one, just like img but with transparency |
java.awt.Image |
filterImage(java.awt.image.BufferedImage image)
Filters an image and return a new partially transparent image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageUtils(java.awt.Color[] transparentColors)
ImageUtil
object.
transparentColors
- the colors that will be substituted by a completely
transparent color ('0x00FFFFFF'). transparentColors cannot be null.public ImageUtils()
Method Detail |
---|
public java.awt.Image filterImage(java.awt.image.BufferedImage image)
image
- the image that is to be filtered.
public java.awt.image.BufferedImage ensureRGBAImage(java.awt.image.BufferedImage image)
img
is BufferedImage.TYPE_INT_ARGB
and if is not, create a new one, just like img
but with transparency
image
- the image to be checked. Cannot be null.
BufferedImage.TYPE_INT_ARGB
, or a
new transparent one.
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org