API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. IndexColorModel View Source
Author(s)
Since
Version
10 Feb 1997
Serial
Hierarchy
 Object
      ColorModel
          IndexColorModel
Implements
Subclasses
Description
public class IndexColorModel
  The IndexColorModel class is a ColorModel class that works with pixel values consisting of a single sample that is an index into a fixed colormap in the default sRGB color space.
Constructors
public IndexColorModel (int bits, int size, byte[] r, byte[] g, byte[] b)
  Constructs an IndexColorModel from the specified arrays of red, green, and blue components.
public IndexColorModel (int bits, int size, byte[] r, byte[] g, byte[] b, byte[] a)
  Constructs an IndexColorModel from the given arrays of red, green, blue and alpha components.
public IndexColorModel (int bits, int size, byte[] r, byte[] g, byte[] b, int trans)
  Constructs an IndexColorModel from the given arrays of red, green, and blue components.
public IndexColorModel (int bits, int size, byte[] cmap, int start, boolean hasalpha)
  Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
public IndexColorModel (int bits, int size, byte[] cmap, int start, boolean hasalpha, int trans)
  Constructs an IndexColorModel from a single array of interleaved red, green, blue and optional alpha components.
public IndexColorModel (int bits, int size, int[] cmap, int start, boolean hasalpha, int trans, int transferType)
  Constructs an IndexColorModel from an array of ints where each int is comprised of red, green, blue, and optional alpha components in the default RGB color model format.
public IndexColorModel (int bits, int size, int[] cmap, int start, int transferType, BigInteger validBits)
  Constructs an IndexColorModel from an int array where each int is comprised of red, green, blue, and alpha components in the default RGB color model format.
Methods
Hide/Show inherited methods
public ColorModel coerceData (WritableRaster raster, boolean isAlphaPremultiplied) [Inherited From ColorModel]
  Forces the raster data to match the state specified in the isAlphaPremultiplied variable, assuming the data is currently correctly described by this ColorModel.
public BufferedImage convertToIntDiscrete (Raster raster, boolean forceARGB)
  Returns a new BufferedImage of TYPE_INT_ARGB or TYPE_INT_RGB that has a Raster with pixel data computed by expanding the indices in the source Raster using the color/alpha component arrays of this ColorModel.
public SampleModel createCompatibleSampleModel (int w, int h) [Overrides ColorModel]
  Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel.
public WritableRaster createCompatibleWritableRaster (int w, int h) [Overrides ColorModel]
  Creates a WritableRaster with the specified width and height that has a data layout (SampleModel) compatible with this ColorModel.
public boolean equals (Object obj) [Inherited From ColorModel]
  Tests if the specified Object is an instance of ColorModel and if it equals this ColorModel.
public void finalize () [Overrides ColorModel]
Disposes of system resources associated with this ColorModel once this ColorModel is no longer referenced.
publicfinal int getAlpha (int pixel) [Specified in ColorModel]
  Returns the alpha component for the specified pixel, scaled from 0 to 255.
public int getAlpha (Object inData) [Inherited From ColorModel]
  Returns the alpha component for the specified pixel, scaled from 0 to 255.
public WritableRaster getAlphaRaster (WritableRaster raster) [Inherited From ColorModel]
  Returns a Raster representing the alpha channel of an image, extracted from the input Raster, provided that pixel values of this ColorModel represent color and alpha information as separate spatial bands (e.g.
publicfinal void getAlphas (byte[] a)
  Copies the array of alpha transparency components into the specified array.
publicfinal int getBlue (int pixel) [Specified in ColorModel]
  Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getBlue (Object inData) [Inherited From ColorModel]
  Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal void getBlues (byte[] b)
  Copies the array of blue color components into the specified array.
publicfinal ColorSpace getColorSpace () [Inherited From ColorModel]
  Returns the ColorSpace associated with this ColorModel.
public int getComponents (int pixel, int[] components, int offset) [Overrides ColorModel]
  Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
public int getComponents (Object pixel, int[] components, int offset) [Overrides ColorModel]
  Returns an array of unnormalized color/alpha components for a specified pixel in this ColorModel.
public int getComponentSize () [Overrides ColorModel]
  Returns an array of the number of bits for each color/alpha component.
public int getComponentSize (int componentIdx) [Inherited From ColorModel]
  Returns the number of bits for the specified color/alpha component.
public int getDataElement (float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns a pixel value represented as an int in this ColorModel, given an array of normalized color/alpha components.
public int getDataElement (int[] components, int offset) [Overrides ColorModel]
  Returns a pixel value represented as an int in this ColorModel given an array of unnormalized color/alpha components.
public Object getDataElements (float[] normComponents, int normOffset, Object obj) [Inherited From ColorModel]
  Returns a data element array representation of a pixel in this ColorModel, given an array of normalized color/alpha components.
public Object getDataElements (int[] components, int offset, Object pixel) [Overrides ColorModel]
  Returns a data element array representation of a pixel in this ColorModel given an array of unnormalized color/alpha components.
publicsynchronized Object getDataElements (int rgb, Object pixel) [Overrides ColorModel]
  Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model.
pack-privatestatic int getDefaultTransferType (int pixel_bits) [Inherited From ColorModel]
pack-privatestatic byte getGray16TosRGB8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getGray8TosRGB8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
publicfinal int getGreen (int pixel) [Specified in ColorModel]
  Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getGreen (Object inData) [Inherited From ColorModel]
  Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal void getGreens (byte[] g)
  Copies the array of green color components into the specified array.
pack-privatestatic short getLinearGray16ToOtherGray16LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getLinearGray16ToOtherGray8LUT (ICC_ColorSpace grayCS) [Inherited From ColorModel]
pack-privatestatic byte getLinearRGB16TosRGB8LUT () [Inherited From ColorModel]
pack-privatestatic byte getLinearRGB8TosRGB8LUT () [Inherited From ColorModel]
publicfinal int getMapSize ()
  Returns the size of the color/alpha component arrays in this IndexColorModel.
public float getNormalizedComponents (int[] components, int offset, float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in normalized form, given an unnormalized component array.
public float getNormalizedComponents (Object pixel, float[] normComponents, int normOffset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in normalized form, given a pixel in this ColorModel.
public int getNumColorComponents () [Inherited From ColorModel]
  Returns the number of color components in this ColorModel.
public int getNumComponents () [Inherited From ColorModel]
  Returns the number of components, including alpha, in this ColorModel.
public int getPixelSize () [Inherited From ColorModel]
  Returns the number of bits per pixel described by this ColorModel.
publicfinal int getRed (int pixel) [Specified in ColorModel]
  Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
public int getRed (Object inData) [Inherited From ColorModel]
  Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace, sRGB.
publicfinal void getReds (byte[] r)
  Copies the array of red color components into the specified array.
publicfinal int getRGB (int pixel) [Overrides ColorModel]
  Returns the color/alpha components of the pixel in the default RGB color model format.
public int getRGB (Object inData) [Inherited From ColorModel]
  Returns the color/alpha components for the specified pixel in the default RGB color model format.
publicstatic ColorModel getRGBdefault () [Inherited From ColorModel]
  Returns a DirectColorModel that describes the default format for integer RGB values used in many of the methods in the AWT image interfaces for the convenience of the programmer.
publicfinal void getRGBs (int[] rgb)
  Converts data for each index from the color and alpha component arrays to an int in the default RGB ColorModel format and copies the resulting 32-bit ARGB values into the specified array.
pack-privatestatic short getsRGB8ToLinearRGB16LUT () [Inherited From ColorModel]
pack-privatestatic byte getsRGB8ToLinearRGB8LUT () [Inherited From ColorModel]
publicfinal int getTransferType () [Inherited From ColorModel]
  Returns the transfer type of this ColorModel.
public int getTransparency () [Overrides ColorModel]
  Returns the transparency.
publicfinal int getTransparentPixel ()
  Returns the index of a transparent pixel in this IndexColorModel or -1 if there is no pixel with an alpha value of 0.
public int getUnnormalizedComponents (float[] normComponents, int normOffset, int[] components, int offset) [Inherited From ColorModel]
  Returns an array of all of the color/alpha components in unnormalized form, given a normalized component array.
public BigInteger getValidPixels ()
  Returns a BigInteger that indicates the valid/invalid pixels in the colormap.
publicfinal boolean hasAlpha () [Inherited From ColorModel]
  Returns whether or not alpha is supported in this ColorModel.
public int hashCode () [Inherited From ColorModel]
  Returns the hash code for this ColorModel.
publicfinal boolean isAlphaPremultiplied () [Inherited From ColorModel]
  Returns whether or not the alpha has been premultiplied in the pixel values to be translated by this ColorModel.
public boolean isCompatibleRaster (Raster raster) [Overrides ColorModel]
  Returns true if raster is compatible with this ColorModel or false if it is not compatible with this ColorModel.
public boolean isCompatibleSampleModel (SampleModel sm) [Overrides ColorModel]
  Checks if the specified SampleModel is compatible with this ColorModel.
pack-privatestatic boolean isLinearGRAYspace (ColorSpace cs) [Inherited From ColorModel]
pack-privatestatic boolean isLinearRGBspace (ColorSpace cs) [Inherited From ColorModel]
public boolean isValid ()
  Returns whether or not all of the pixels are valid.
public boolean isValid (int pixel)
  Returns whether or not the pixel is valid.
pack-privatestatic void loadLibraries () [Inherited From ColorModel]
public String toString () [Overrides ColorModel]
  Returns the String representation of the contents of this ColorModelobject.
Fields
Hide/Show inherited fields
pack-private ColorSpace colorSpace [Inherited From ColorModel]
pack-private int colorSpaceType [Inherited From ColorModel]
pack-privatestatic Map g16Tos8Map [Inherited From ColorModel]
pack-privatestatic Map g8Tos8Map [Inherited From ColorModel]
pack-private boolean is_sRGB [Inherited From ColorModel]
pack-private boolean isAlphaPremultiplied [Inherited From ColorModel]
pack-privatestatic byte l16Tos8 [Inherited From ColorModel]
pack-privatestatic byte l8Tos8 [Inherited From ColorModel]
pack-privatestatic Map lg16Toog16Map [Inherited From ColorModel]
pack-privatestatic Map lg16Toog8Map [Inherited From ColorModel]
pack-private int maxBits [Inherited From ColorModel]
pack-private int nBits [Inherited From ColorModel]
pack-private int numColorComponents [Inherited From ColorModel]
pack-private int numComponents [Inherited From ColorModel]
protected int pixel_bits [Inherited From ColorModel]
The total number of bits in the pixel.
pack-privatestatic short s8Tol16 [Inherited From ColorModel]
pack-privatestatic byte s8Tol8 [Inherited From ColorModel]
pack-private boolean supportsAlpha [Inherited From ColorModel]
protected int transferType [Inherited From ColorModel]
Data type of the array used to represent pixel values.
pack-private int transparency [Inherited From ColorModel]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar