java.awt.image.IndexColorModel (JDK 1.0)
This class is a ColorModel that determines the red, green, blue, and alpha values for a pixel by using the pixel value as an index into colormap arrays. If no array of alpha values is specified, all pixels are considered fully opaque, except for one optionally specified reserved value that is fully transparent. This color model is useful when working with image data that is defined in terms of a color map.
You should not need to instantiate any kind of ColorModel object unless you are processing image data that does not use the standard RGB color format.
public classIndexColorModelextends ColorModel { //Public ConstructorspublicIndexColorModel(intbits, intsize, byte[]r, byte[]g, byte[]b); publicIndexColorModel(intbits, intsize, byte[]r, byte[]g, byte[]b, inttrans); publicIndexColorModel(intbits, intsize, byte[]r, byte[]g, byte[]b, byte[]a); publicIndexColorModel(intbits, intsize, byte[]cmap, intstart, booleanhasalpha); publicIndexColorModel(intbits, intsize, byte[]cmap, intstart, booleanhasalpha, inttrans); //Public Instance Methodspublic final intgetAlpha(intpixel); //Defines ColorModelpublic final voidgetAlphas(byte[]a); public final intgetBlue(intpixel); //Defines ColorModelpublic final voidgetBlues(byte[]b); public final intgetGreen(intpixel); //Defines ColorModelpublic final voidgetGreens(byte[]g); public final intgetMapSize(); public final intgetRGB(intpixel); //Overrides ColorModelpublic final intgetRed(intpixel); //Defines ColorModelpublic final voidgetReds(byte[]r); public final intgetTransparentPixel(); }
Hierarchy:
Object->ColorModel->IndexColorModel
Passed To:
RGBImageFilter.filterIndexColorModel()
Returned By:
RGBImageFilter.filterIndexColorModel()