Package com.jhlabs.image
Class ContrastFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.PointFilter
com.jhlabs.image.TransferFilter
com.jhlabs.image.ContrastFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
A filter to change the brightness and contrast 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Get the filter brightness.float
Get the filter contrast.void
setBrightness
(float brightness) Set the filter brightness.void
setContrast
(float contrast) Set the filter contrast.toString()
protected float
transferFunction
(float f) Methods inherited from class com.jhlabs.image.TransferFilter
filter, filterRGB, getLUT, initialize, makeTable
Methods inherited from class com.jhlabs.image.PointFilter
setDimensions
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
ContrastFilter
public ContrastFilter()
-
-
Method Details
-
transferFunction
protected float transferFunction(float f) - Overrides:
transferFunction
in classTransferFilter
-
setBrightness
public void setBrightness(float brightness) Set the filter brightness.- Parameters:
brightness
- the brightness in the range 0 to 1- See Also:
-
getBrightness
public float getBrightness()Get the filter brightness.- Returns:
- the brightness in the range 0 to 1
- See Also:
-
setContrast
public void setContrast(float contrast) Set the filter contrast.- Parameters:
contrast
- the contrast in the range 0 to 1- See Also:
-
getContrast
public float getContrast()Get the filter contrast.- Returns:
- the contrast in the range 0 to 1
- See Also:
-
toString
-