Class OilFilter

All Implemented Interfaces:
BufferedImageOp, Cloneable

public class OilFilter extends WholeImageFilter
A filter which produces a "oil-painting" effect.
  • Constructor Details

    • OilFilter

      public OilFilter()
  • Method Details

    • setRange

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

      public int getRange()
      Get the range of the effect in pixels.
      Returns:
      the range
      See Also:
    • setLevels

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

      public int getLevels()
      Get the number of levels for the effect.
      Returns:
      the number of levels
      See Also:
    • filterPixels

      protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
      Description copied from class: WholeImageFilter
      Actually filter the pixels.
      Specified by:
      filterPixels in class WholeImageFilter
      Parameters:
      width - the image width
      height - the image height
      inPixels - the image pixels
      transformedSpace - the output bounds
      Returns:
      the output pixels
    • toString

      public String toString()
      Overrides:
      toString in class Object