Class DiscreteAlphaIndexColorModel

java.lang.Object
java.awt.image.ColorModel
com.twelvemonkeys.imageio.color.DiscreteAlphaIndexColorModel
All Implemented Interfaces:
Transparency

public final class DiscreteAlphaIndexColorModel extends ColorModel
This class represents a hybrid between an IndexColorModel and a ComponentColorModel, having both a color map and a full, discrete alpha channel and/or one or more "extra" channels. The color map entries are assumed to be fully opaque and should have no transparent index.

ColorSpace will always be the default sRGB color space (as with IndexColorModel).

Component order is always I, A, X1, X2... Xn, where I is a palette index, A is the alpha value and Xn are extra samples (ignored for display).

See Also:
  • Field Details

    • icm

      private final IndexColorModel icm
    • extraSamples

      private final int extraSamples
    • samples

      private final int samples
  • Constructor Details

    • DiscreteAlphaIndexColorModel

      public DiscreteAlphaIndexColorModel(IndexColorModel icm)
      Creates a DiscreteAlphaIndexColorModel, delegating color map look-ups to the given IndexColorModel.
      Parameters:
      icm - The IndexColorModel delegate. Color map entries are assumed to be fully opaque, any transparency or transparent index will be ignored.
    • DiscreteAlphaIndexColorModel

      public DiscreteAlphaIndexColorModel(IndexColorModel icm, int extraSamples, boolean hasAlpha)
      Creates a DiscreteAlphaIndexColorModel, delegating color map look-ups to the given IndexColorModel.
      Parameters:
      icm - The IndexColorModel delegate. Color map entries are assumed to be fully opaque, any transparency or transparent index will be ignored.
      extraSamples - the number of extra samples in the color model.
      hasAlpha - true if the extra samples contains alpha, otherwise false.
  • Method Details