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

public Class TIFFT4Compressor

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

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
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.
encodeT4
(boolean
Whether to perform one-dimensional encoding.
is1DMode
,
boolean
Whether EOL bit sequences should be padded.
isEOLAligned
,
byte[]
The row of data to compress.
data
,
int
Byte step between the same sample in different rows.
lineStride
,
int
Bit offset within first data[rowOffset].
colOffset
,
int
Number of bits in the row.
width
,
int
Number of rows in the buffer.
height
,
byte[]
The compressed data.
compData
)

Encode a buffer of data using CCITT T.4 Compression also known as Group 3 facsimile compression.

public void
setMetadata(IIOMetadata
the IIOMetadata object for the image being written.
metadata
)

Overrides com.sun.imageio.plugins.tiff.TIFFFaxCompressor.setMetadata.

Sets the value of the metadata field.

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

Field Detail

is1DModeback to summary
private boolean is1DMode
isEOLAlignedback to summary
private boolean isEOLAligned

Constructor Detail

TIFFT4Compressorback to summary
public TIFFT4Compressor()

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.
encodeT4back to summary
public int encodeT4(boolean is1DMode, boolean isEOLAligned, byte[] data, int lineStride, int colOffset, int width, int height, byte[] compData)

Encode a buffer of data using CCITT T.4 Compression also known as Group 3 facsimile compression.

Parameters
is1DMode:boolean

Whether to perform one-dimensional encoding.

isEOLAligned:boolean

Whether EOL bit sequences should be padded.

data:byte[]

The row of data to compress.

lineStride:int

Byte step between the same sample in different rows.

colOffset:int

Bit offset within first data[rowOffset].

width:int

Number of bits in the row.

height:int

Number of rows in the buffer.

compData:byte[]

The compressed data.

Returns:int

The number of bytes saved in the compressed data array.

setMetadataback to summary
public void setMetadata(IIOMetadata metadata)

Overrides com.sun.imageio.plugins.tiff.TIFFFaxCompressor.setMetadata.

Sets the value of the metadata field.

The implementation in this class also sets local options from the T4_OPTIONS field if it exists, and if it doesn't, adds it with default values.

Parameters
metadata:IIOMetadata

the IIOMetadata object for the image being written.

Annotations
@Override
See Also
getMetadata()