com.jhlabs.image

Class GammaFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class GammaFilter
extends TransferFilter

A filter for changing the gamma of an image.

Field Summary

Fields inherited from class com.jhlabs.image.TransferFilter

bTable, gTable, initialized, rTable

Fields inherited from class com.jhlabs.image.PointFilter

canFilterIndexColorModel

Constructor Summary

GammaFilter()
Construct a GammaFilter.
GammaFilter(float gamma)
Construct a GammaFilter.
GammaFilter(float rGamma, float gGamma, float bGamma)
Construct a GammaFilter.

Method Summary

float
getGamma()
Get the gamma level.
protected void
initialize()
void
setGamma(float gamma)
Set the gamma level.
void
setGamma(float rGamma, float gGamma, float bGamma)
Set the gamma levels.
String
toString()

Methods inherited from class com.jhlabs.image.TransferFilter

filter, filterRGB, getLUT, initialize, makeTable, transferFunction

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

Constructor Details

GammaFilter

public GammaFilter()
Construct a GammaFilter.

GammaFilter

public GammaFilter(float gamma)
Construct a GammaFilter.
Parameters:
gamma - the gamma level for all RGB channels

GammaFilter

public GammaFilter(float rGamma,
                   float gGamma,
                   float bGamma)
Construct a GammaFilter.
Parameters:
rGamma - the gamma level for the red channel
gGamma - the gamma level for the blue channel
bGamma - the gamma level for the green channel

Method Details

getGamma

public float getGamma()
Get the gamma level.
Returns:
the gamma level for all RGB channels
See Also:
setGamma

initialize

protected void initialize()
Overrides:
initialize in interface TransferFilter

setGamma

public void setGamma(float gamma)
Set the gamma level.
Parameters:
gamma - the gamma level for all RGB channels

setGamma

public void setGamma(float rGamma,
                     float gGamma,
                     float bGamma)
Set the gamma levels.
Parameters:
rGamma - the gamma level for the red channel
gGamma - the gamma level for the blue channel
bGamma - the gamma level for the green channel

toString

public String toString()