Class XTIFFUncompTileCodec

java.lang.Object
org.libtiff.jai.codec.XTIFFTileCodecImpl
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 Details

    • XTIFFUncompTileCodec

      public XTIFFUncompTileCodec()
  • Method Details

    • 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:
    • encodeTilePixels

      public int encodeTilePixels(int[] pixels, 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, 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, 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.