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 and Description |
|---|---|
private int |
bitBuffer |
private java.io.DataInput |
in |
private int |
numBufferedBits |
| Constructor and Description |
|---|
TIFFDecoderModifiedHuffman() |
| Modifier and Type | Method and 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() |
java.lang.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() |
getBytesPerRow, getCodec, getImageFileDirectory, getInput, getTileIndex, getX1, getX2, getY1, getY2, putBytes, setCodec, setImageFileDirectory, setTileIndexprivate java.io.DataInput in
private int bitBuffer
private int numBufferedBits
public void decode()
throws InvalidFileStructureException,
java.io.IOException
TIFFDecoderdecode in class TIFFDecoderInvalidFileStructureExceptionjava.io.IOExceptionprivate int decodeBlackRun()
throws InvalidFileStructureException,
java.io.IOException
InvalidFileStructureExceptionjava.io.IOExceptionprivate void decodeRow(byte[] row)
throws InvalidFileStructureException,
java.io.IOException
InvalidFileStructureExceptionjava.io.IOExceptionprivate int decodeRun(int[][][] codes,
int minCodeSize)
throws InvalidFileStructureException,
java.io.IOException
InvalidFileStructureExceptionjava.io.IOExceptionprivate int decodeWhiteRun()
throws InvalidFileStructureException,
java.io.IOException
InvalidFileStructureExceptionjava.io.IOExceptionpublic java.lang.Integer[] getCompressionTypes()
TIFFDecoderTIFFConstants.
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 TIFFDecoderpublic void initialize()
throws java.io.IOException,
MissingParameterException
TIFFDecoderinitialize in class TIFFDecoderjava.io.IOExceptionMissingParameterExceptionprivate int readBit()
throws java.io.IOException
java.io.IOExceptionprivate int readBits(int number)
throws java.io.IOException
java.io.IOExceptionprivate void reset()