public class QuantizeFilter extends WholeImageFilter implements DynFiltering
Constructor and Description |
---|
QuantizeFilter() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
filter(BufferedImage src,
Struct parameters) |
boolean |
getDither()
Return the dithering setting
|
int |
getNumColors()
Get the number of colors to quantize to.
|
boolean |
getSerpentine()
Return the serpentine setting
|
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.
|
String |
toString() |
filter
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public QuantizeFilter()
public 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 BufferedImage filter(BufferedImage src, Struct parameters) throws PageException
filter
in interface DynFiltering
filter
in class WholeImageFilter
PageException
Copyright © 2015 Lucee