APIdia Launch Partner
Top Fields Constructors Methods
com.sun.imageio.plugins.tiff

public Class TIFFRLECompressor

extends TIFFFaxCompressor
Class Inheritance
Imports
javax.imageio.plugins.tiff.BaselineTIFFTagSet, java.io.IOException, javax.imageio.IIOException

Field Summary

Inherited from com.sun.imageio.plugins.tiff.TIFFFaxCompressor:
bitsBLACKbyteTablehorzhorzModeinverseFillmakeupCodesmakeupCodesBlackmakeupCodesWhitendexpasspassModetermCodestermCodesBlacktermCodesWhitevertvertModeWHITE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
encode(byte[] b, int off, int width, int height, int[] bitsPerSample, int scanlineStride)

Implements abstract com.sun.imageio.plugins.tiff.TIFFCompressor.encode.

Encodes the supplied image data, writing to the currently set ImageOutputStream.

public int

Returns:

The number of bytes saved in the compressed data array.
encodeRLE
(byte[]
The row of data to compress.
data
,
int
Starting index in data.
rowOffset
,
int
Bit offset within first data[rowOffset].
colOffset
,
int
Number of bits in the row.
rowLength
,
byte[]
The compressed data.
compData
)

Encode a row of data using Modified Huffman Compression also known as CCITT RLE (Run Length Encoding).

Inherited from com.sun.imageio.plugins.tiff.TIFFFaxCompressor:
add1DBitsadd2DBitsaddEOFBaddEOLencode1DinitBitBufnextStatesetMetadata

Constructor Detail

TIFFRLECompressorback to summary
public TIFFRLECompressor()

Method Detail

encodeback to summary
public int encode(byte[] b, int off, int width, int height, int[] bitsPerSample, int scanlineStride) throws IOException

Implements abstract com.sun.imageio.plugins.tiff.TIFFCompressor.encode.

Doc from com.sun.imageio.plugins.tiff.TIFFCompressor.encode.

Encodes the supplied image data, writing to the currently set ImageOutputStream.

Annotations
@Override
Exceptions
IOException:
if the supplied data cannot be encoded by this TIFFCompressor, or if any I/O error occurs during writing.
encodeRLEback to summary
public int encodeRLE(byte[] data, int rowOffset, int colOffset, int rowLength, byte[] compData)

Encode a row of data using Modified Huffman Compression also known as CCITT RLE (Run Length Encoding).

Parameters
data:byte[]

The row of data to compress.

rowOffset:int

Starting index in data.

colOffset:int

Bit offset within first data[rowOffset].

rowLength:int

Number of bits in the row.

compData:byte[]

The compressed data.

Returns:int

The number of bytes saved in the compressed data array.