public class TIFFDecoderModifiedHuffman extends TIFFDecoder
2
in the compression tag of an image file directory.
Only bilevel images can be encoded with that method.Modifier and Type | Field | Description |
---|---|---|
private int |
bitBuffer |
|
private DataInput |
in |
|
private int |
numBufferedBits |
Constructor | Description |
---|---|
TIFFDecoderModifiedHuffman() |
Modifier and Type | Method | Description |
---|---|---|
void |
decode() |
Decode data from input and write the decompressed pixel data to
the image associated with this decoder.
|
private int |
decodeBlackRun() |
|
private void |
decodeRow(byte[] row) |
|
private int |
decodeRun(int[][][] codes,
int minCodeSize) |
|
private int |
decodeWhiteRun() |
|
Integer[] |
getCompressionTypes() |
Returns an array with Integer values of all compression types supported by
this decoder (see the COMPRESSION_xyz constants in
TIFFConstants . |
void |
initialize() |
Check if all necessary parameters have been given to this decoder
and initialize several internal fields from them.
|
private int |
readBit() |
|
private int |
readBits(int number) |
|
private void |
reset() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBytesPerRow, getCodec, getImageFileDirectory, getInput, getTileIndex, getX1, getX2, getY1, getY2, putBytes, setCodec, setImageFileDirectory, setTileIndex
private DataInput in
private int bitBuffer
private int numBufferedBits
public void decode() throws InvalidFileStructureException, IOException
TIFFDecoder
decode
in class TIFFDecoder
InvalidFileStructureException
IOException
private int decodeBlackRun() throws InvalidFileStructureException, IOException
private void decodeRow(byte[] row) throws InvalidFileStructureException, IOException
private int decodeRun(int[][][] codes, int minCodeSize) throws InvalidFileStructureException, IOException
private int decodeWhiteRun() throws InvalidFileStructureException, IOException
public Integer[] getCompressionTypes()
TIFFDecoder
TIFFConstants
.
Normally, this is only one value, but some compression types got assigned more than one constant
(e.g. deflated).
Also, a decoder could be capable of dealing with more than one type of compression
if the compression types are similar enough to justify that.
However, typically a decoder can only deal with one type of compression.getCompressionTypes
in class TIFFDecoder
public void initialize() throws IOException, MissingParameterException
TIFFDecoder
initialize
in class TIFFDecoder
IOException
MissingParameterException
private int readBit() throws IOException
IOException
private int readBits(int number) throws IOException
IOException
private void reset()