public class TIFFDecoderLogLuv extends TIFFDecoder
34676
(TIFFConstants.COMPRESSION_SGI_LOG_RLE
)
in the compression tag of an image file directory.
Only image data with a photometric interpretation value of
TIFFConstants.PHOTOMETRIC_TRUECOLOR_LOGLUV
can be compressed with this method.
This implementation is based on the file tif_luv.c
which
is part of the TIFF library libtiff.
The original implementation was written by Greg W. Larson.
Learn more about the color type and its encoding on Greg's page LogLuv Encoding for TIFF Images. You will also find numerous sample image files there.
Modifier and Type | Field and Description |
---|---|
private int |
compressedSize |
private java.io.DataInput |
in |
private boolean |
rle |
private int |
tileWidth |
Constructor and Description |
---|
TIFFDecoderLogLuv() |
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 void |
decodeRow(byte[] row) |
private void |
decodeRowPacked24(byte[] row) |
private void |
decodeRowRLE(byte[] row) |
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.
|
getBytesPerRow, getCodec, getImageFileDirectory, getInput, getTileIndex, getX1, getX2, getY1, getY2, putBytes, setCodec, setImageFileDirectory, setTileIndex
private java.io.DataInput in
private int compressedSize
private int tileWidth
private boolean rle
public void decode() throws InvalidFileStructureException, java.io.IOException
TIFFDecoder
decode
in class TIFFDecoder
InvalidFileStructureException
java.io.IOException
private void decodeRow(byte[] row) throws InvalidFileStructureException, java.io.IOException
InvalidFileStructureException
java.io.IOException
private void decodeRowPacked24(byte[] row) throws InvalidFileStructureException, java.io.IOException
InvalidFileStructureException
java.io.IOException
private void decodeRowRLE(byte[] row) throws InvalidFileStructureException, java.io.IOException
InvalidFileStructureException
java.io.IOException
public java.lang.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 java.io.IOException, MissingParameterException
TIFFDecoder
initialize
in class TIFFDecoder
java.io.IOException
MissingParameterException