public class GrayFilter extends RGBImageFilter
canFilterIndexColorModel, newmodel, origmodelconsumerCOMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT| Constructor and Description |
|---|
GrayFilter(boolean b, int p)
Constructs a GrayFilter object that filters a color image to a grayscale image.
|
| Modifier and Type | Method and Description |
|---|---|
static Image |
createDisabledImage(Image
Creates a disabled image
|
int |
filterRGB(int x, int y, int rgb)
Overrides
RGBImageFilter.filterRGB.
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModelclone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setPropertiespublic GrayFilter(boolean b,
int p)
b - a boolean -- true if the pixels should be brightened
p - an int in the range 0..100 that determines the percentage of gray, where 100 is the darkest gray, and 0 is the lightest
public int filterRGB(int x,
int y,
int rgb)
RGBImageFilter.filterRGB.
filterRGB in class
RGBImageFilter
x - the X coordinate of the pixel
y - the Y coordinate of the pixel
rgb - the integer pixel representation in the default RGB color model
ColorModel.getRGBdefault() ,
RGBImageFilter.filterRGBPixels(int, int, int, int, int[], int, int)