typedef struct fz_jbig2_globals fz_jbig2_globals
struct fz_range
{
int64_t offset;
uint64_t length;
}
fz_stream *
fz_open_null_filter (
fz_context *ctx,
fz_stream *chain,
uint64_t len,
int64_t offset
)
The null filter reads a specified amount of data from the substream.
fz_stream *
fz_open_range_filter (
fz_context *ctx,
fz_stream *chain,
fz_range *ranges,
int nranges
)
The range filter copies data from specified ranges of the chained stream.
fz_stream *
fz_open_endstream_filter (
fz_context *ctx,
fz_stream *chain,
uint64_t len,
int64_t offset
)
The endstream filter reads a PDF substream, and starts to look for an ‘endstream’ token after the specified length.
fz_stream *
fz_open_concat (
fz_context *ctx,
int max,
int pad
)
Concat filter concatenates several streams into one.
void
fz_concat_push_drop (
fz_context *ctx,
fz_stream *concat,
fz_stream *chain
)
Add a chained stream to the end of the concatenate filter.
Ownership of chain is passed in.
fz_stream *
fz_open_arc4 (
fz_context *ctx,
fz_stream *chain,
unsigned char *key,
unsigned keylen
)
arc4 filter performs RC4 decoding of data read from the chained filter using the supplied key.
fz_stream *
fz_open_aesd (
fz_context *ctx,
fz_stream *chain,
unsigned char *key,
unsigned keylen
)
aesd filter performs AES decoding of data read from the chained filter using the supplied key.
fz_stream *
fz_open_a85d (
fz_context *ctx,
fz_stream *chain
)
a85d filter performs ASCII 85 Decoding of data read from the chained filter.
fz_stream *
fz_open_ahxd (
fz_context *ctx,
fz_stream *chain
)
ahxd filter performs ASCII Hex decoding of data read from the chained filter.
fz_stream *
fz_open_rld (
fz_context *ctx,
fz_stream *chain
)
rld filter performs Run Length Decoding of data read from the chained filter.
fz_stream *
fz_open_dctd (
fz_context *ctx,
fz_stream *chain,
int color_transform,
int invert_cmyk,
int l2factor,
fz_stream *jpegtables
)
dctd filter performs DCT (JPEG) decoding of data read from the chained filter.
color_transform implements the PDF color_transform option use -1 for default behavior use 0 to disable YUV-RGB / YCCK-CMYK transforms use 1 to enable YUV-RGB / YCCK-CMYK transforms
invert_cmyk implements the necessary inversion for Photoshop CMYK images use 0 if embedded in PDF use 1 if not embedded in PDF
For subsampling on decode, set l2factor to the log2 of the reduction required (therefore 0 = full size decode).
jpegtables is an optional stream from which the JPEG tables can be read. Use NULL if not required.
fz_stream *
fz_open_faxd (
fz_context *ctx,
fz_stream *chain,
int k,
int end_of_line,
int encoded_byte_align,
int columns,
int rows,
int end_of_block,
int black_is_1
)
faxd filter performs FAX decoding of data read from the chained filter.
fz_stream *
fz_open_flated (
fz_context *ctx,
fz_stream *chain,
int window_bits
)
flated filter performs LZ77 decoding (inflating) of data read from the chained filter.
fz_stream *
fz_open_libarchived (
fz_context *ctx,
fz_stream *chain
)
libarchived filter performs generic compressed decoding of data in any format understood by libarchive from the chained filter.
This will throw an exception if libarchive is not built in, or if the compression format is not recognised.
fz_stream *
fz_open_brotlid (
fz_context *ctx,
fz_stream *chain
)
brotlid filter performs Brotli decoding of data read from the chained filter.
fz_stream *
fz_open_lzwd (
fz_context *ctx,
fz_stream *chain,
int early_change,
int min_bits,
int reverse_bits,
int old_tiff
)
lzwd filter performs LZW decoding of data read from the chained filter.
fz_stream *
fz_open_predict (
fz_context *ctx,
fz_stream *chain,
int predictor,
int columns,
int colors,
int bpc
)
predict filter performs pixel prediction on data read from the chained filter.
fz_stream *
fz_open_jbig2d (
fz_context *ctx,
fz_stream *chain,
fz_jbig2_globals *globals,
int embedded
)
Open a filter that performs jbig2 decompression on the chained stream, using the optional globals record.
fz_jbig2_globals *
fz_load_jbig2_globals (
fz_context *ctx,
fz_buffer *buf
)
Create a jbig2 globals record from a buffer.
Immutable once created.
fz_jbig2_globals *
fz_keep_jbig2_globals (
fz_context *ctx,
fz_jbig2_globals *globals
)
Increment the reference count for a jbig2 globals record.
Never throws an exception.
void
fz_drop_jbig2_globals (
fz_context *ctx,
fz_jbig2_globals *globals
)
Decrement the reference count for a jbig2 globals record. When the reference count hits zero, the record is freed.
Never throws an exception.
void
fz_drop_jbig2_globals_imp (
fz_context *ctx,
fz_storable *globals
)
Special jbig2 globals drop function for use in implementing store support.
fz_buffer *
fz_jbig2_globals_data (
fz_context *ctx,
fz_jbig2_globals *globals
)
Return buffer containing jbig2 globals data stream.
Extra filters for tiff
fz_stream *
fz_open_sgilog16 (
fz_context *ctx,
fz_stream *chain,
int w
)
SGI Log 16bit (greyscale) decode from the chained filter. Decodes lines of w pixels to 8bpp greyscale.
fz_stream *
fz_open_sgilog24 (
fz_context *ctx,
fz_stream *chain,
int w
)
SGI Log 24bit (LUV) decode from the chained filter. Decodes lines of w pixels to 8bpc rgb.
fz_stream *
fz_open_sgilog32 (
fz_context *ctx,
fz_stream *chain,
int w
)
SGI Log 32bit (LUV) decode from the chained filter. Decodes lines of w pixels to 8bpc rgb.
fz_stream *
fz_open_thunder (
fz_context *ctx,
fz_stream *chain,
int w
)
4bit greyscale Thunderscan decoding from the chained filter. Decodes lines of w pixels to 8bpp greyscale.