com.jhlabs.image

Class DissolveFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class DissolveFilter
extends PointFilter

A filter which "dissolves" an image by thresholding the alpha channel with random numbers.

Field Summary

Fields inherited from class com.jhlabs.image.PointFilter

canFilterIndexColorModel

Constructor Summary

DissolveFilter()

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
int
filterRGB(int x, int y, int rgb)
float
getDensity()
Get the density of the image.
float
getSoftness()
Get the softness of the dissolve.
void
setDensity(float density)
Set the density of the image in the range 0..1.
void
setSoftness(float softness)
Set the softness of the dissolve in the range 0..1.
String
toString()

Methods inherited from class com.jhlabs.image.PointFilter

filter, filterRGB, setDimensions

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

DissolveFilter

public DissolveFilter()

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Overrides:
filter in interface PointFilter

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Overrides:
filterRGB in interface PointFilter

getDensity

public float getDensity()
Get the density of the image.
Returns:
the density

getSoftness

public float getSoftness()
Get the softness of the dissolve.
Returns:
the softness

setDensity

public void setDensity(float density)
Set the density of the image in the range 0..1.
Parameters:
density - the density

setSoftness

public void setSoftness(float softness)
Set the softness of the dissolve in the range 0..1.
Parameters:
softness - the softness

toString

public String toString()