net.sourceforge.jiu.codecs.tiff

Class TIFFDecoderLogLuv


public class TIFFDecoderLogLuv
extends TIFFDecoder

A TIFF decoder for files compressed with the LogLuv RLE method. This compression algorithm has the value 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.

Author:
Marco Schmidt
Since:
0.10.0

Field Summary

private int
compressedSize
private DataInput
in
private boolean
rle
private int
tileWidth

Fields inherited from class net.sourceforge.jiu.codecs.tiff.TIFFDecoder

bottomRow, bufferIndex, codec, currentRow, ifd, leftColumn, processedTileRows, rightColumn, rowBuffer, tileIndex, topRow, totalTileRows

Method Summary

void
decode()
private void
decodeRow(byte[] row)
private void
decodeRowPacked24(byte[] row)
private void
decodeRowRLE(byte[] row)
Integer[]
getCompressionTypes()
void
initialize()

Methods inherited from class net.sourceforge.jiu.codecs.tiff.TIFFDecoder

decode, getBytesPerRow, getCodec, getCompressionTypes, getImageFileDirectory, getInput, getTileIndex, getX1, getX2, getY1, getY2, initialize, putBytes, setCodec, setImageFileDirectory, setTileIndex, storeRow

Field Details

compressedSize

private int compressedSize

in

private DataInput in

rle

private boolean rle

tileWidth

private int tileWidth

Method Details

decode

public void decode()
            throws InvalidFileStructureException,
                   IOException
Overrides:
decode in interface TIFFDecoder

decodeRow

private void decodeRow(byte[] row)
            throws InvalidFileStructureException,
                   IOException

decodeRowPacked24

private void decodeRowPacked24(byte[] row)
            throws InvalidFileStructureException,
                   IOException

decodeRowRLE

private void decodeRowRLE(byte[] row)
            throws InvalidFileStructureException,
                   IOException

getCompressionTypes

public Integer[] getCompressionTypes()
Overrides:
getCompressionTypes in interface TIFFDecoder

initialize

public void initialize()
            throws IOException,
                   MissingParameterException
Overrides:
initialize in interface TIFFDecoder