|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.pdf.codec.CCITTG4Encoder
public class CCITTG4Encoder
Encodes data in the CCITT G4 FAX format.
Field Summary | |
---|---|
private int |
bit
|
private static int |
CODE
|
private int |
data
|
private byte[] |
dataBp
|
private static int |
EOL
|
private static int |
G3CODE_EOF
|
private static int |
G3CODE_EOL
|
private static int |
G3CODE_INCOMP
|
private static int |
G3CODE_INVALID
|
private int[] |
horizcode
|
private static int |
LENGTH
|
private int[] |
msbmask
|
private int |
offsetData
|
private static byte[] |
oneruns
|
private ByteBuffer |
outBuf
|
private int[] |
passcode
|
private byte[] |
refline
|
private int |
rowbytes
|
private int |
rowpixels
|
private static int |
RUNLEN
|
private int |
sizeData
|
private int[][] |
TIFFFaxBlackCodes
|
private int[][] |
TIFFFaxWhiteCodes
|
private int[][] |
vcodes
|
private static byte[] |
zeroruns
|
Constructor Summary | |
---|---|
CCITTG4Encoder(int width)
Creates a new encoder. |
Method Summary | |
---|---|
byte[] |
close()
Closes the encoder and returns the encoded data. |
static byte[] |
compress(byte[] data,
int width,
int height)
Encodes a full image. |
private void |
Fax3Encode2DRow()
|
void |
fax4Encode(byte[] data,
int height)
Encodes a number of lines. |
void |
fax4Encode(byte[] data,
int offset,
int size)
Encodes a number of lines. |
private void |
Fax4PostEncode()
|
private static int |
find0span(byte[] bp,
int offset,
int bs,
int be)
|
private static int |
find1span(byte[] bp,
int offset,
int bs,
int be)
|
private static int |
finddiff(byte[] bp,
int offset,
int bs,
int be,
int color)
|
private static int |
finddiff2(byte[] bp,
int offset,
int bs,
int be,
int color)
|
private int |
pixel(byte[] data,
int offset,
int bit)
|
private void |
putBits(int bits,
int length)
|
private void |
putcode(int[] table)
|
private void |
putspan(int span,
int[][] tab)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int rowbytes
private int rowpixels
private int bit
private int data
private byte[] refline
private ByteBuffer outBuf
private byte[] dataBp
private int offsetData
private int sizeData
private static byte[] zeroruns
private static byte[] oneruns
private static final int LENGTH
private static final int CODE
private static final int RUNLEN
private static final int EOL
private static final int G3CODE_EOL
private static final int G3CODE_INVALID
private static final int G3CODE_EOF
private static final int G3CODE_INCOMP
private int[][] TIFFFaxWhiteCodes
private int[][] TIFFFaxBlackCodes
private int[] horizcode
private int[] passcode
private int[][] vcodes
private int[] msbmask
Constructor Detail |
---|
public CCITTG4Encoder(int width)
width
- the line widthMethod Detail |
---|
public void fax4Encode(byte[] data, int offset, int size)
data
- the data to be encodedoffset
- the offset into the datasize
- the size of the data to be encodedpublic static byte[] compress(byte[] data, int width, int height)
data
- the data to encodewidth
- the image widthheight
- the image height
public void fax4Encode(byte[] data, int height)
data
- the data to be encodedheight
- the number of lines to encodeprivate void putcode(int[] table)
private void putspan(int span, int[][] tab)
private void putBits(int bits, int length)
private void Fax3Encode2DRow()
private void Fax4PostEncode()
public byte[] close()
private int pixel(byte[] data, int offset, int bit)
private static int find1span(byte[] bp, int offset, int bs, int be)
private static int find0span(byte[] bp, int offset, int bs, int be)
private static int finddiff(byte[] bp, int offset, int bs, int be, int color)
private static int finddiff2(byte[] bp, int offset, int bs, int be, int color)
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |