RGBImageFilterNameRGBImageFilter
DescriptionRGBImageFilter is an abstract class that helps you filter images based on each pixel's color and position. In most cases, the only method you need to implement in subclasses is filterRGB(), which returns a new pixel value based on the old pixel's color and position. RGBImageFilter cannot be used to implement filters that depend on the value of neighboring pixels, or other factors aside from color and position. Class Definition
public abstract class java.awt.image.RGBImageFilter extends java.awt.image.ImageFilter { // Variables protected boolean canFilterIndexColorModel; protected ColorModel newmodel; protected ColorModel oldmodel; // Instance Methods public IndexColorModel filterIndexColorModel (IndexColorModel icm); public abstract int filterRGB (int x, int y, int rgb); public void filterRGBPixels (int x, int y, int width, int height, int[] pixels, int off, int scansize); public void setColorModel (ColorModel model); public void setPixels (int x, int y, int width, int height, ColorModel model, byte[] pixels, int offset, int scansize); public void setPixels (int x, int y, int width, int height, ColorModel model, int[] pixels, int offset, int scansize); public void substituteColorModel (ColorModel oldModel, ColorModel newModel); } VariablescanFilterIndexColorModelprotected boolean canFilterIndexColorModelSetting the canFilterIndexColorModel variable to true indicates the filter can filter IndexColorModel images. To filter an IndexColorModel, the filter must depend only on color, not on position. newmodelprotected ColorModel newmodelA place to store a new ColorModel. origmodelprotected ColorModel origmodelA place to store an old ColorModel. Instance MethodsfilterIndexColorModelpublic IndexColorModel filterIndexColorModel (IndexColorModel icm)
filterRGBpublic abstract int filterRGB (int x, int y, int rgb)
filterRGBPixelspublic void filterRGBPixels (int x, int y, int width, int height, int[] pixels, int off, int scansize)
setColorModelpublic void setColorModel (ColorModel model)
setPixelspublic void setPixels (int x, int y, int width, int height, ColorModel model, byte[] pixels, int offset, int scansize)
public void setPixels (int x, int y, int width, int height, ColorModel model, int[] pixels, int offset, int scansize)
substituteColorModelpublic void substituteColorModel (ColorModel oldModel, ColorModel newModel)
See AlsoColorModel, ImageFilter |
|