Class TritoneFilter

All Implemented Interfaces:
BufferedImageOp, Cloneable

public class TritoneFilter extends PointFilter
A filter which performs a tritone conversion on an image. Given three colors for shadows, midtones and highlights, it converts the image to grayscale and then applies a color mapping based on the colors.
  • Constructor Details

    • TritoneFilter

      public TritoneFilter()
  • Method Details

    • filter

      public BufferedImage filter(BufferedImage src, BufferedImage dst)
      Specified by:
      filter in interface BufferedImageOp
      Overrides:
      filter in class PointFilter
    • filterRGB

      public int filterRGB(int x, int y, int rgb)
      Specified by:
      filterRGB in class PointFilter
    • setShadowColor

      public void setShadowColor(int shadowColor)
      Set the shadow color.
      Parameters:
      shadowColor - the shadow color
      See Also:
    • getShadowColor

      public int getShadowColor()
      Get the shadow color.
      Returns:
      the shadow color
      See Also:
    • setMidColor

      public void setMidColor(int midColor)
      Set the mid color.
      Parameters:
      midColor - the mid color
      See Also:
      • invalid reference
        #getmidColor
    • getMidColor

      public int getMidColor()
      Get the mid color.
      Returns:
      the mid color
      See Also:
      • invalid reference
        #setmidColor
    • setHighColor

      public void setHighColor(int highColor)
      Set the high color.
      Parameters:
      highColor - the high color
      See Also:
      • invalid reference
        #gethighColor
    • getHighColor

      public int getHighColor()
      Get the high color.
      Returns:
      the high color
      See Also:
      • invalid reference
        #sethighColor
    • toString

      public String toString()
      Overrides:
      toString in class Object