com.jhlabs.image

Class TritoneFilter

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.

Field Summary

Fields inherited from class com.jhlabs.image.PointFilter

canFilterIndexColorModel

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
int
filterRGB(int x, int y, int rgb)
int
getHighColor()
Get the high color.
int
getMidColor()
Get the mid color.
int
getShadowColor()
Get the shadow color.
void
setHighColor(int highColor)
Set the high color.
void
setMidColor(int midColor)
Set the mid color.
void
setShadowColor(int shadowColor)
Set the shadow color.
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

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

getHighColor

public int getHighColor()
Get the high color.
Returns:
the high color
See Also:
TritoneFilter

getMidColor

public int getMidColor()
Get the mid color.
Returns:
the mid color
See Also:
TritoneFilter

getShadowColor

public int getShadowColor()
Get the shadow color.
Returns:
the shadow color

setHighColor

public void setHighColor(int highColor)
Set the high color.
Parameters:
highColor - the high color
See Also:
TritoneFilter

setMidColor

public void setMidColor(int midColor)
Set the mid color.
Parameters:
midColor - the mid color
See Also:
TritoneFilter

setShadowColor

public void setShadowColor(int shadowColor)
Set the shadow color.
Parameters:
shadowColor - the shadow color

toString

public String toString()