public class Grayscale extends java.lang.Object implements IApplyInPlace
| Modifier and Type | Class and Description |
|---|---|
static class |
Grayscale.Algorithm
Three methods for grayscale.
|
| Constructor and Description |
|---|
Grayscale()
Initializes a new instance of the Grayscale class.
|
Grayscale(double redCoefficient,
double greenCoefficient,
double blueCoefficient)
Initializes a new instance of the Grayscale class.
|
Grayscale(Grayscale.Algorithm grayscaleMethod)
Initializes a new instance of the Grayscale class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyInPlace(FastBitmap fastBitmap)
Apply filter to a FastBitmap.
|
double |
getBlueCoefficient()
Get blue coefficient
|
Grayscale.Algorithm |
getGrayscaleMethod()
Get Grayscale Method
|
double |
getGreenCoefficient()
Get green coefficient
|
double |
getRedCoefficient()
Get red coefficient
|
void |
setBlueCoefficient(double blueCoefficient)
Set blue coefficient
|
void |
setGrayscaleMethod(Grayscale.Algorithm grayscaleMethod)
Set Grayscale Method
|
void |
setGreenCoefficient(double greenCoefficient)
Set green coefficient
|
void |
setRedCoefficient(double redCoefficient)
Set red coefficient
|
public Grayscale()
public Grayscale(double redCoefficient,
double greenCoefficient,
double blueCoefficient)
redCoefficient - Portion of red channel's value to use during conversion from RGB to grayscale.greenCoefficient - Portion of green channel's value to use during conversion from RGB to grayscale.blueCoefficient - Portion of blue channel's value to use during conversion from RGB to grayscale.public Grayscale(Grayscale.Algorithm grayscaleMethod)
grayscaleMethod - Methods for grayscaling.public double getRedCoefficient()
public void setRedCoefficient(double redCoefficient)
redCoefficient - red coefficientpublic double getGreenCoefficient()
public void setGreenCoefficient(double greenCoefficient)
greenCoefficient - green coefficientpublic double getBlueCoefficient()
public void setBlueCoefficient(double blueCoefficient)
blueCoefficient - blue coefficientpublic Grayscale.Algorithm getGrayscaleMethod()
public void setGrayscaleMethod(Grayscale.Algorithm grayscaleMethod)
grayscaleMethod - Grayscale Methodpublic void applyInPlace(FastBitmap fastBitmap)
applyInPlace in interface IApplyInPlacefastBitmap - Image to be processed.