public class PaletteBox extends Box
data, extraLength, length, type
Constructor and Description |
---|
PaletteBox(byte[] data)
Constructs a
PlatteBox from the provided byte array. |
PaletteBox(IndexColorModel icm)
Constructs a
PlatteBox from an
IndexColorModel . |
PaletteBox(int length,
byte[] comp,
byte[][] lut)
Constructs a
PlatteBox from the provided length, bit
depths of the color components and the LUT. |
PaletteBox(Node node)
Constructs a
PlatteBox from an
org.w3c.dom.Node . |
Modifier and Type | Method and Description |
---|---|
protected void |
compose()
Composes the content byte array from the data elements.
|
byte[] |
getBitDepths()
Return the bit depths for all the color components.
|
byte[][] |
getLUT()
Return the LUT.
|
IIOMetadataNode |
getNativeNode()
creates an
IIOMetadataNode from this palette box. |
int |
getNumComp()
Return the number of color components.
|
int |
getNumEntries()
Return the number of palette entries.
|
protected void |
parse(byte[] data)
Parses the data elements from the byte array.
|
copyInt, createBox, getAttribute, getBoxClass, getByteArrayElementValue, getByteElementValue, getContent, getExtraLength, getIntArrayElementValue, getIntElementValue, getLength, getName, getNativeNodeForSimpleBox, getShortElementValue, getStringElementValue, getType, getTypeByName, getTypeInt, getTypeString, parseByteArray, parseIntArray, read, setContent, setDefaultAttributes, setExtraLength, setLength, write
public PaletteBox(IndexColorModel icm)
PlatteBox
from an
IndexColorModel
.public PaletteBox(Node node) throws IIOInvalidTreeException
PlatteBox
from an
org.w3c.dom.Node
.IIOInvalidTreeException
public PaletteBox(int length, byte[] comp, byte[][] lut)
PlatteBox
from the provided length, bit
depths of the color components and the LUT.public PaletteBox(byte[] data)
PlatteBox
from the provided byte array.public int getNumEntries()
public int getNumComp()
public byte[] getBitDepths()
public byte[][] getLUT()
public IIOMetadataNode getNativeNode()
IIOMetadataNode
from this palette box.
The format of this node is defined in the XML dtd and xsd
for the JP2 image file.getNativeNode
in class Box
protected void parse(byte[] data)
Box
Copyright © 2015–2022 SCIFIO. All rights reserved.