public class RBCodecCCITTFaxDecode extends RBCodec
Modifier and Type | Field and Description |
---|---|
static int |
EndOfTheLine |
static int |
Horizontal |
static int |
PassMode |
static int |
UncompressedMode |
static int |
Vertical0 |
static int |
VerticalLeft1 |
static int |
VerticalLeft2 |
static int |
VerticalLeft3 |
static int |
VerticalRight1 |
static int |
VerticalRight2 |
static int |
VerticalRight3 |
Constructor and Description |
---|
RBCodecCCITTFaxDecode(byte[] bits,
int offset,
int k,
int rows,
int columns,
int numdamagedrows,
boolean aligned,
boolean eolrequired,
boolean eoblockrequired,
boolean blackisone)
main constructor
|
Modifier and Type | Method and Description |
---|---|
void |
backup()
Back the stream up to the marked position
|
boolean |
blackIsOne()
Returns whether a pixel value or 1 should be interpreted as black or white
|
void |
byteAlignStream()
Skips over any extra padding bits at the end of a byte.
|
static byte[] |
bytesForCCITTFaxDecode(byte[] bytes,
int offset,
int len,
int K,
int rows,
int columns,
boolean byteAligned,
boolean eolRequired,
boolean eoblockRequired,
boolean blackIsOne,
int allowedDamagedRows)
convenience method to decode a single image
|
boolean |
decodeScanline1D(byte[] outdata) |
boolean |
decodeScanline2D(byte[] outdata)
2D decoder.
|
byte[] |
decodeStream()
Decode the entire image at once
|
void |
decodeStream(java.io.OutputStream outstream)
Decode, writing image bytes to outstream
|
int |
getHeight()
Get the height of the decompressed image
|
int |
getNextCodeword(int[] table) |
int |
getNextInt(int[] table)
Interprets next n codewords as an integer.
|
int |
getWidth()
Get the width of the decompressed image
|
void |
locateReferenceMarks(byte[] scanline,
int a0,
byte a0color,
int[] b) |
void |
mark()
Mark the current point in the bitstream.
|
void |
setDimensions(int width,
int height)
Set the dimensions manually
|
void |
writeScanline(java.io.OutputStream out,
byte[] scanline)
Write the decoded scanline to a stream.
|
bytesForASCII85, bytesForASCIIHex, bytesForASCIIHex
public static final int EndOfTheLine
public static final int PassMode
public static final int Horizontal
public static final int Vertical0
public static final int VerticalRight1
public static final int VerticalRight2
public static final int VerticalRight3
public static final int VerticalLeft1
public static final int VerticalLeft2
public static final int VerticalLeft3
public static final int UncompressedMode
public RBCodecCCITTFaxDecode(byte[] bits, int offset, int k, int rows, int columns, int numdamagedrows, boolean aligned, boolean eolrequired, boolean eoblockrequired, boolean blackisone)
public static byte[] bytesForCCITTFaxDecode(byte[] bytes, int offset, int len, int K, int rows, int columns, boolean byteAligned, boolean eolRequired, boolean eoblockRequired, boolean blackIsOne, int allowedDamagedRows)
public int getNextCodeword(int[] table)
public int getNextInt(int[] table)
public void byteAlignStream()
public void mark()
public void backup()
@Nullable public byte[] decodeStream()
public void decodeStream(java.io.OutputStream outstream) throws PDFException, java.io.IOException
PDFException
java.io.IOException
public boolean decodeScanline1D(byte[] outdata)
public void locateReferenceMarks(byte[] scanline, int a0, byte a0color, int[] b)
public boolean decodeScanline2D(byte[] outdata)
public void writeScanline(java.io.OutputStream out, byte[] scanline) throws java.io.IOException
java.io.IOException
public int getWidth()
public int getHeight()
public boolean blackIsOne()
public void setDimensions(int width, int height)