com.jhlabs.image
Class DisplaceFilter
- BufferedImageOp, Cloneable
public class DisplaceFilter
A filter which simulates the appearance of looking through glass. A separate grayscale displacement image is provided and
pixels in the source image are displaced according to the gradient of the displacement map.
DisplaceFilter
public DisplaceFilter()
filter
public BufferedImage filter(BufferedImage src,
BufferedImage dst)
- filter in interface TransformFilter
getAmount
public float getAmount()
Get the amount of distortion.
getDisplacementMap
public BufferedImage getDisplacementMap()
Get the displacement map.
- an image representing the displacment at each point
setAmount
public void setAmount(float amount)
Set the amount of distortion.
setDisplacementMap
public void setDisplacementMap(BufferedImage displacementMap)
Set the displacement map.
displacementMap
- an image representing the displacment at each point
toString
public String toString()
transformInverse
protected void transformInverse(int x,
int y,
float[] out)
Inverse transform a point. This method needs to be overriden by all subclasses.
- transformInverse in interface TransformFilter
x
- the X position of the pixel in the output imagey
- the Y position of the pixel in the output imageout
- the position of the pixel in the input image