org.libtiff.jai.codecimpl
Class XTIFFUncompTileCodec

java.lang.Object
  extended by org.libtiff.jai.codec.XTIFFTileCodecImpl
      extended by org.libtiff.jai.codecimpl.XTIFFUncompTileCodec
All Implemented Interfaces:
XTIFFTileCodec

public class XTIFFUncompTileCodec
extends XTIFFTileCodecImpl

This codec encapsulates all the logic for the default TIFF "uncompressed" bit-packing codec algorithm.


Constructor Summary
XTIFFUncompTileCodec()
           
 
Method Summary
 boolean canEncode()
          Indicate whether this codec can encode data.
 XTIFFTileCodec create()
          Implement this to return the corresponding empty codec object.
 void decodeTilePixels(byte[] input, java.awt.Rectangle rect, byte[] bpixels)
          Decompress data packed bytes into packed bytes
 void decodeTilePixels(byte[] input, java.awt.Rectangle rect, short[] spixels)
          Decompress data packed bytes into short
 int encodeTilePixels(int[] pixels, java.awt.Rectangle rect, byte[] bpixels)
          encode the tile into bpixels and return the byte size (uncompressed packing algorithm).
 void register()
          Registration method.
 
Methods inherited from class org.libtiff.jai.codec.XTIFFTileCodecImpl
create, create, decode, encode, getCompressedTileSize, getCompression, initialize, initializeDecoding, initializeEncoding, register
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XTIFFUncompTileCodec

public XTIFFUncompTileCodec()
Method Detail

create

public XTIFFTileCodec create()
Description copied from class: XTIFFTileCodecImpl
Implement this to return the corresponding empty codec object.

Specified by:
create in class XTIFFTileCodecImpl

canEncode

public boolean canEncode()
Description copied from class: XTIFFTileCodecImpl
Indicate whether this codec can encode data. Override to return true only if your codec implments encoding.

Overrides:
canEncode in class XTIFFTileCodecImpl

register

public void register()
Description copied from class: XTIFFTileCodecImpl
Registration method. Must be implemented by the extended class to register itself with the XTIFFDirectory for all compression codes it supports (e.g Fax codec supports 3 codes).

Specified by:
register in interface XTIFFTileCodec
Specified by:
register in class XTIFFTileCodecImpl
See Also:
XTIFFDirectory

encodeTilePixels

public int encodeTilePixels(int[] pixels,
                            java.awt.Rectangle rect,
                            byte[] bpixels)
encode the tile into bpixels and return the byte size (uncompressed packing algorithm). The padding has already been done, so we may safely assume that pixels is exactly rows by cols by numBands ints.

Overrides:
encodeTilePixels in class XTIFFTileCodecImpl
Parameters:
pixels - input pixels
rect - the array dimensions of samples
bpixels - the target array of compressed byte data

decodeTilePixels

public void decodeTilePixels(byte[] input,
                             java.awt.Rectangle rect,
                             byte[] bpixels)
Decompress data packed bytes into packed bytes

Specified by:
decodeTilePixels in class XTIFFTileCodecImpl
Parameters:
input - the byte array of compressed input data
rect - the rectangular shape of the target pixels
bpixels - the target decompressed pixels.

decodeTilePixels

public void decodeTilePixels(byte[] input,
                             java.awt.Rectangle rect,
                             short[] spixels)
Decompress data packed bytes into short

Specified by:
decodeTilePixels in class XTIFFTileCodecImpl
Parameters:
input - the byte array of compressed input data
rect - the rectangular shape of the target pixels
spixels - the target decompressed pixels.