- java.lang.Object
-
- com.itextpdf.text.pdf.codec.CCITTG4Encoder
-
public class CCITTG4Encoder extends java.lang.ObjectEncodes data in the CCITT G4 FAX format.
-
-
Constructor Summary
Constructors Constructor Description CCITTG4Encoder(int width)Creates a new encoder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]close()Closes the encoder and returns the encoded data.static byte[]compress(byte[] data, int width, int height)Encodes a full image.voidfax4Encode(byte[] data, int height)Encodes a number of lines.voidfax4Encode(byte[] data, int offset, int size)Encodes a number of lines.
-
-
-
Method Detail
-
fax4Encode
public void fax4Encode(byte[] data, int offset, int size)Encodes a number of lines.- Parameters:
data- the data to be encodedoffset- the offset into the datasize- the size of the data to be encoded
-
compress
public static byte[] compress(byte[] data, int width, int height)Encodes a full image.- Parameters:
data- the data to encodewidth- the image widthheight- the image height- Returns:
- the encoded image
-
fax4Encode
public void fax4Encode(byte[] data, int height)Encodes a number of lines.- Parameters:
data- the data to be encodedheight- the number of lines to encode
-
close
public byte[] close()
Closes the encoder and returns the encoded data.- Returns:
- the encoded data
-
-