java.awt.image
public abstract class RGBImageFilter extends ImageFilter
Field Summary | |
---|---|
protected boolean | canFilterIndexColorModel
Specifies whether to apply the filter to the index entries of the
IndexColorModel. |
protected ColorModel | newmodel |
protected ColorModel | origmodel |
Constructor Summary | |
---|---|
RGBImageFilter()
Construct new RGBImageFilter. |
Method Summary | |
---|---|
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. |
Parameters: icm an IndexColorModel to filter
Parameters: x x-coordinate y y-coordinate rgb color
Parameters: x the x coordinate of the rectangle y the y coordinate of the rectangle w the width of the rectangle h the height of the rectangle pixels the array of pixel values offset the index of the first pixels in the
pixels
array scansize the width to use in extracting pixels from the
pixels
array
Parameters: model the color model to be used most often by setPixels
See Also: ColorModel
Parameters: x the x coordinate of the rectangle y the y coordinate of the rectangle w the width of the rectangle h the height of the rectangle model the ColorModel
used to translate the pixels pixels the array of pixel values offset the index of the first pixels in the pixels
array scansize the width to use in extracting pixels from the
pixels
array
int
at
index (n * scansize + m + offset).
Parameters: x the x coordinate of the rectangle y the y coordinate of the rectangle w the width of the rectangle h the height of the rectangle model the ColorModel
used to translate the pixels pixels the array of pixel values offset the index of the first pixels in the pixels
array scansize the width to use in extracting pixels from the
pixels
array
Parameters: oldcm the old ColorModel newcm the new ColorModel