com.jhlabs.image

Class OilFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class OilFilter
extends WholeImageFilter

A filter which produces a "oil-painting" effect.

Field Summary

Fields inherited from class com.jhlabs.image.WholeImageFilter

originalSpace, transformedSpace

Constructor Summary

OilFilter()
Construct a WholeImageFilter.

Method Summary

protected int[]
filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
Actually filter the pixels.
int
getLevels()
Get the number of levels for the effect.
int
getRange()
Get the range of the effect in pixels.
void
setLevels(int levels)
Set the number of levels for the effect.
void
setRange(int range)
Set the range of the effect in pixels.
String
toString()

Methods inherited from class com.jhlabs.image.WholeImageFilter

filter, filterPixels, transformSpace

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

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

Constructor Details

OilFilter

public OilFilter()
Construct a WholeImageFilter.

Method Details

filterPixels

protected int[] filterPixels(int width,
                             int height,
                             int[] inPixels,
                             Rectangle transformedSpace)
Actually filter the pixels.
Overrides:
filterPixels in interface WholeImageFilter
Parameters:
width - the image width
height - the image height
inPixels - the image pixels
transformedSpace - the output bounds
Returns:
the output pixels

getLevels

public int getLevels()
Get the number of levels for the effect.
Returns:
the number of levels

getRange

public int getRange()
Get the range of the effect in pixels.
Returns:
the range

setLevels

public void setLevels(int levels)
Set the number of levels for the effect.
Parameters:
levels - the number of levels

setRange

public void setRange(int range)
Set the range of the effect in pixels.
Parameters:
range - the range

toString

public String toString()