Package org.libtiff.jai.codecimpl
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.
-
-
Field Summary
-
Fields inherited from class org.libtiff.jai.codec.XTIFFTileCodecImpl
_bdata, _sdata, bitsPerSample, bpixvals, buffer, colormap, compression, dataType, decodePaletteAsShorts, decodeParam, directory, encodeParam, image, image_type, isTiled, length, minX, minY, numBands, sampleModel, sampleSize, spixvals, tileLength, tileWidth, unitsInThisTile, width
-
-
Constructor Summary
Constructors Constructor Description XTIFFUncompTileCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEncode()Indicate whether this codec can encode data.XTIFFTileCodeccreate()Implement this to return the corresponding empty codec object.voiddecodeTilePixels(byte[] input, Rectangle rect, byte[] bpixels)Decompress data packed bytes into packed bytesvoiddecodeTilePixels(byte[] input, Rectangle rect, short[] spixels)Decompress data packed bytes into shortintencodeTilePixels(int[] pixels, Rectangle rect, byte[] bpixels)encode the tile into bpixels and return the byte size (uncompressed packing algorithm).voidregister()Registration method.-
Methods inherited from class org.libtiff.jai.codec.XTIFFTileCodecImpl
create, create, decode, decodeColor, decodeColor, decodeColor, decodeColor, decodeTilePixels, encode, getCompressedTileSize, getCompression, getLongField, getTilePixels, initialize, initialize, initialize, initializeDecoding, initializeEncoding, register, setTilePixels, setupBufferForDecoding, setupBufferForEncoding, setupSourceImage, unpackShorts
-
-
-
-
Method Detail
-
create
public XTIFFTileCodec create()
Description copied from class:XTIFFTileCodecImplImplement this to return the corresponding empty codec object.- Specified by:
createin classXTIFFTileCodecImpl
-
canEncode
public boolean canEncode()
Description copied from class:XTIFFTileCodecImplIndicate whether this codec can encode data. Override to return true only if your codec implments encoding.- Overrides:
canEncodein classXTIFFTileCodecImpl
-
register
public void register()
Description copied from class:XTIFFTileCodecImplRegistration 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:
registerin interfaceXTIFFTileCodec- Specified by:
registerin classXTIFFTileCodecImpl- See Also:
XTIFFDirectory
-
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:
encodeTilePixelsin classXTIFFTileCodecImpl- Parameters:
pixels- input pixelsrect- the array dimensions of samplesbpixels- 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:
decodeTilePixelsin classXTIFFTileCodecImpl- Parameters:
input- the byte array of compressed input datarect- the rectangular shape of the target pixelsbpixels- the target decompressed pixels.
-
decodeTilePixels
public void decodeTilePixels(byte[] input, Rectangle rect, short[] spixels)Decompress data packed bytes into short- Specified by:
decodeTilePixelsin classXTIFFTileCodecImpl- Parameters:
input- the byte array of compressed input datarect- the rectangular shape of the target pixelsspixels- the target decompressed pixels.
-
-