public abstract class RGBImageFilter extends ImageFilter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canFilterIndexColorModel
Specifies whether to apply the filter to the index entries of the
IndexColorModel.
|
protected ColorModel |
newmodel |
protected ColorModel |
origmodel |
consumerCOMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT| Constructor and Description |
|---|
RGBImageFilter()
Construct new RGBImageFilter.
|
| Modifier and Type | Method and Description |
|---|---|
IndexColorModel |
filterIndexColorModel(IndexColorModel icm)
Filters an IndexColorModel through the filterRGB function.
|
abstract int |
filterRGB(int x,
int y,
int rgb)
Filters a single pixel from the default ColorModel.
|
void |
filterRGBPixels(int x,
int y,
int w,
int h,
int[] pixels,
int offset,
int scansize)
This functions filters a set of RGB pixels through filterRGB.
|
void |
setColorModel(ColorModel model)
Sets the ColorModel used to filter with.
|
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int offset,
int scansize)
If the ColorModel is the same ColorModel which as already converted
then it converts it the converted ColorModel.
|
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int offset,
int scansize)
This function delivers a rectangle of pixels where any
pixel(m,n) is stored in the array as an
int at
index (n * scansize + m + offset). |
void |
substituteColorModel(ColorModel oldcm,
ColorModel newcm)
Registers a new ColorModel to subsitute for the old ColorModel when
setPixels encounters the a pixel with the old ColorModel.
|
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setPropertiesprotected ColorModel origmodel
protected ColorModel newmodel
protected boolean canFilterIndexColorModel
public RGBImageFilter()
public void setColorModel(ColorModel model)
setColorModel in interface ImageConsumersetColorModel in class ImageFiltermodel - the color model to be used most often by setPixelsColorModelpublic void substituteColorModel(ColorModel oldcm, ColorModel newcm)
oldcm - the old ColorModelnewcm - the new ColorModelpublic IndexColorModel filterIndexColorModel(IndexColorModel icm)
icm - an IndexColorModel to filterpublic void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int offset, int scansize)
x - the x coordinate of the rectangley - the y coordinate of the rectanglew - the width of the rectangleh - the height of the rectanglepixels - the array of pixel valuesoffset - the index of the first pixels in the
pixels arrayscansize - the width to use in extracting pixels from the
pixels arraypublic void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize)
setPixels in interface ImageConsumersetPixels in class ImageFilterx - the x coordinate of the rectangley - the y coordinate of the rectanglew - the width of the rectangleh - the height of the rectanglemodel - the ColorModel used to translate the pixelspixels - the array of pixel valuesoffset - the index of the first pixels in the pixels
arrayscansize - the width to use in extracting pixels from the
pixels arraypublic void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int offset, int scansize)
int at
index (n * scansize + m + offset).setPixels in interface ImageConsumersetPixels in class ImageFilterx - the x coordinate of the rectangley - the y coordinate of the rectanglew - the width of the rectangleh - the height of the rectanglemodel - the ColorModel used to translate the pixelspixels - the array of pixel valuesoffset - the index of the first pixels in the pixels
arrayscansize - the width to use in extracting pixels from the
pixels arraypublic abstract int filterRGB(int x, int y, int rgb)
x - x-coordinatey - y-coordinatergb - color