public class QuantizeFilter extends WholeImageFilter implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static int[] |
matrix
Floyd-Steinberg ditherin gmatrix.
|
canFilterIndexColorModel, defaultRGBModel, inBytePixels, inPixels, originalSpace, transformedSpace| Constructor and Description |
|---|
QuantizeFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getDither()
Return the dithering setting
|
int |
getNumColors()
Get the number of colors to quantize to.
|
boolean |
getSerpentine()
Return the serpentine setting
|
void |
imageComplete(int status) |
void |
quantize(int[] inPixels,
int[] outPixels,
int width,
int height,
int numColors,
boolean dither,
boolean serpentine) |
void |
setDither(boolean dither)
Set whether to use dithering or not.
|
void |
setNumColors(int numColors)
Set the number of colors to quantize to.
|
void |
setSerpentine(boolean serpentine)
Set whether to use a serpentine pattern for return or not.
|
java.lang.String |
toString() |
getTransformedSpace, setColorModel, setDimensions, setPixels, setPixels, transformSpacepublic void setNumColors(int numColors)
numColors - the number of colors. The default is 256.public int getNumColors()
public void setDither(boolean dither)
dither - true to use ditheringpublic boolean getDither()
public void setSerpentine(boolean serpentine)
serpentine - true to use serpentine patternpublic boolean getSerpentine()
public void quantize(int[] inPixels,
int[] outPixels,
int width,
int height,
int numColors,
boolean dither,
boolean serpentine)
public void imageComplete(int status)
imageComplete in interface java.awt.image.ImageConsumerimageComplete in class java.awt.image.ImageFilterpublic java.lang.String toString()
toString in class java.lang.Object