Package com.jhlabs.image
Class ApplyMaskFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.ApplyMaskFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
A filter which uses the alpha channel of a "mask" image to interpolate between a source and destination image.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an ApplyMaskFIlter.ApplyMaskFilter
(BufferedImage maskImage, BufferedImage destination) Construct an ApplyMaskFIlter. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
composeThroughMask
(Raster src, WritableRaster dst, Raster sel) Interpolates between two rasters according to the alpha level of a mask raster.filter
(BufferedImage src, BufferedImage dst) Get the destination image.Get the mask image.void
setDestination
(BufferedImage destination) Set the destination image.void
setMaskImage
(BufferedImage maskImage) Set the mask image.toString()
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
ApplyMaskFilter
public ApplyMaskFilter()Construct an ApplyMaskFIlter. -
ApplyMaskFilter
Construct an ApplyMaskFIlter.- Parameters:
maskImage
- the mask imagedestination
- the destination image
-
-
Method Details
-
setDestination
Set the destination image.- Parameters:
destination
- the destination image- See Also:
-
getDestination
Get the destination image.- Returns:
- the destination image
- See Also:
-
setMaskImage
Set the mask image.- Parameters:
maskImage
- the mask image- See Also:
-
getMaskImage
Get the mask image.- Returns:
- the mask image
- See Also:
-
composeThroughMask
Interpolates between two rasters according to the alpha level of a mask raster.- Parameters:
src
- the source rasterdst
- the destination rastersel
- the mask raster
-
filter
-
toString
-