protected ColorModel (int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)

Constructs a ColorModel that translates pixel values to color/alpha components. Color components will be in the specified ColorSpace. pixel_bits is the number of bits in the pixel values. The bits array specifies the number of significant bits per color and alpha component. Its length should be the number of components in the ColorSpace if there is no alpha information in the pixel values, or one more than this number if there is alpha information. hasAlpha indicates whether or not alpha information is present. The boolean isAlphaPremultiplied specifies how to interpret pixel values in which color and alpha information are represented as separate spatial bands. If the boolean is true, color samples are assumed to have been multiplied by the alpha sample. The transparency specifies what alpha values can be represented by this color model. The transfer type is the type of primitive array used to represent pixel values. Note that the bits array contains the number of significant bits per color/alpha component after the translation from pixel values. For example, for an IndexColorModel with pixel_bits equal to 16, the bits array might have four elements with each element set to 8.

Parameters:
pixel_bits    the number of bits in the pixel values
bits    array that specifies the number of significant bits per color and alpha component
cspace    the specified ColorSpace
hasAlpha    true if alpha information is present; false otherwise
isAlphaPremultiplied    true if color samples are assumed to be premultiplied by the alpha samples; false otherwise
transparency    what alpha values can be represented by this color model
transferType    the type of the array used to represent pixel values

Exceptions:
IllegalArgumentException    if the length of the bit array is less than the number of color or alpha components in this ColorModel, or if the transparency is not a valid value.
IllegalArgumentException    if the sum of the number of bits in bits is less than 1 or if any of the elements in bits is less than 0.

See also:
java.awt.Transparency