Returns a specifier for an indexed-color image format that will pack
index values of the given bit depth into array elements of
the specified data type.
Returns:
an
ImageTypeSpecifier
with the desired
characteristics.
Parameters:
-
redLUT - an array of
byte
s containing
the red values for each index.
-
greenLUT - an array of
byte
s containing * the
green values for each index.
-
blueLUT - an array of
byte
s containing the
blue values for each index.
-
alphaLUT - an array of
byte
s containing the
alpha values for each index, or
null
to create a
fully opaque LUT.
-
bits - the number of bits in each index.
-
dataType - the desired output type, as one of the enumerations
from the
DataBuffer
class.
Throws:
-
IllegalArgumentException - if
redLUT
is
null
.
-
IllegalArgumentException - if
greenLUT
is
null
.
-
IllegalArgumentException - if
blueLUT
is
null
.
-
IllegalArgumentException - if
bits
is
not one of 1, 2, 4, 8, or 16.
-
IllegalArgumentException - if the
non-
null
LUT parameters do not have lengths of
exactly
1 << bits
.
-
IllegalArgumentException - if
dataType
is
not one of
DataBuffer.TYPE_BYTE
,
DataBuffer.TYPE_SHORT
,
DataBuffer.TYPE_USHORT
,
or
DataBuffer.TYPE_INT
.
-
IllegalArgumentException - if
bits
is
larger than the bit size of the given
dataType
.