java.lang.Object
org.sejda.sambox.filter.Filter
org.sejda.sambox.filter.CCITTFaxFilter
Decodes image data that has been encoded using either Group 3 or Group 4 CCITT facsimile (fax)
encoding, and encodes image data to Group 4.
-
Field Summary
Fields inherited from class org.sejda.sambox.filter.Filter
SYSPROP_DEFLATELEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) Decodes data, producing the original non-encoded data.voidencode(InputStream input, OutputStream encoded, COSDictionary parameters) Encodes data.private static voidinvertBitmap(byte[] bufferData) (package private) static voidreadFromDecoderStream(CCITTFaxDecoderStream decoderStream, byte[] result) Methods inherited from class org.sejda.sambox.filter.Filter
findImageReader, getCompressionLevel, getDecodeParams
-
Constructor Details
-
CCITTFaxFilter
CCITTFaxFilter()
-
-
Method Details
-
decode
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException Description copied from class:FilterDecodes data, producing the original non-encoded data.- Specified by:
decodein classFilter- Parameters:
encoded- the encoded byte streamdecoded- the stream where decoded data will be writtenparameters- the parameters used for decodingindex- the index to the filter being decoded- Returns:
- repaired parameters dictionary, or the original parameters dictionary
- Throws:
IOException- if the stream cannot be decoded
-
readFromDecoderStream
static void readFromDecoderStream(CCITTFaxDecoderStream decoderStream, byte[] result) throws IOException - Throws:
IOException
-
invertBitmap
private static void invertBitmap(byte[] bufferData) -
encode
public void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException Description copied from class:FilterEncodes data.- Specified by:
encodein classFilter- Parameters:
input- the byte stream to encodeencoded- the stream where encoded data will be writtenparameters- the parameters used for encoding- Throws:
IOException- if the stream cannot be encoded
-