mupdf
Loading...
Searching...
No Matches
filter.h File Reference
Include dependency graph for filter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fz_range

Typedefs

typedef struct fz_jbig2_globals fz_jbig2_globals

Functions

fz_streamfz_open_null_filter (fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset)
fz_streamfz_open_range_filter (fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges)
fz_streamfz_open_endstream_filter (fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset)
fz_streamfz_open_concat (fz_context *ctx, int max, int pad)
void fz_concat_push_drop (fz_context *ctx, fz_stream *concat, fz_stream *chain)
fz_streamfz_open_arc4 (fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen)
fz_streamfz_open_aesd (fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen)
fz_streamfz_open_a85d (fz_context *ctx, fz_stream *chain)
fz_streamfz_open_ahxd (fz_context *ctx, fz_stream *chain)
fz_streamfz_open_rld (fz_context *ctx, fz_stream *chain)
fz_streamfz_open_dctd (fz_context *ctx, fz_stream *chain, int color_transform, int invert_cmyk, int l2factor, fz_stream *jpegtables)
fz_streamfz_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)
fz_streamfz_open_flated (fz_context *ctx, fz_stream *chain, int window_bits)
fz_streamfz_open_libarchived (fz_context *ctx, fz_stream *chain)
fz_streamfz_open_brotlid (fz_context *ctx, fz_stream *chain)
fz_streamfz_open_lzwd (fz_context *ctx, fz_stream *chain, int early_change, int min_bits, int reverse_bits, int old_tiff)
fz_streamfz_open_predict (fz_context *ctx, fz_stream *chain, int predictor, int columns, int colors, int bpc)
fz_streamfz_open_jbig2d (fz_context *ctx, fz_stream *chain, fz_jbig2_globals *globals, int embedded)
fz_jbig2_globalsfz_load_jbig2_globals (fz_context *ctx, fz_buffer *buf)
fz_jbig2_globalsfz_keep_jbig2_globals (fz_context *ctx, fz_jbig2_globals *globals)
void fz_drop_jbig2_globals (fz_context *ctx, fz_jbig2_globals *globals)
void fz_drop_jbig2_globals_imp (fz_context *ctx, fz_storable *globals)
fz_bufferfz_jbig2_globals_data (fz_context *ctx, fz_jbig2_globals *globals)
fz_streamfz_open_sgilog16 (fz_context *ctx, fz_stream *chain, int w)
fz_streamfz_open_sgilog24 (fz_context *ctx, fz_stream *chain, int w)
fz_streamfz_open_sgilog32 (fz_context *ctx, fz_stream *chain, int w)
fz_streamfz_open_thunder (fz_context *ctx, fz_stream *chain, int w)

Typedef Documentation

◆ fz_jbig2_globals

Function Documentation

◆ fz_concat_push_drop()

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_drop_jbig2_globals()

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.

◆ fz_drop_jbig2_globals_imp()

void fz_drop_jbig2_globals_imp ( fz_context * ctx,
fz_storable * globals )

Special jbig2 globals drop function for use in implementing store support.

◆ fz_jbig2_globals_data()

fz_buffer * fz_jbig2_globals_data ( fz_context * ctx,
fz_jbig2_globals * globals )

Return buffer containing jbig2 globals data stream.

◆ fz_keep_jbig2_globals()

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.

◆ fz_load_jbig2_globals()

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_open_a85d()

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_open_aesd()

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_open_ahxd()

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_open_arc4()

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_open_brotlid()

fz_stream * fz_open_brotlid ( fz_context * ctx,
fz_stream * chain )

brotlid filter performs Brotli decoding of data read from the chained filter.

◆ fz_open_concat()

fz_stream * fz_open_concat ( fz_context * ctx,
int max,
int pad )

Concat filter concatenates several streams into one.

◆ fz_open_dctd()

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_open_endstream_filter()

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_open_faxd()

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.

k: see fax specification (fax default is 0).

end_of_line: whether we expect end of line markers (fax default is 0).

encoded_byte_align: whether we align to bytes after each line (fax default is 0).

columns: how many columns in the image (fax default is 1728).

rows: 0 for unspecified or the number of rows of data to expect.

end_of_block: whether we expect end of block markers (fax default is 1).

black_is_1: determines the polarity of the image (fax default is 0).

◆ fz_open_flated()

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.

window_bits: How large a decompression window to use. Typically

  1. A negative number, -n, means to use n bits, but to expect raw data with no header.

◆ fz_open_jbig2d()

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_open_libarchived()

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_open_lzwd()

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.

early_change: (Default 1) specifies whether to change codes 1 bit early.

min_bits: (Default 9) specifies the minimum number of bits to use.

reverse_bits: (Default 0) allows for compatibility with gif and old style tiffs (1).

old_tiff: (Default 0) allows for different handling of the clear code, as found in old style tiffs.

◆ fz_open_null_filter()

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_open_predict()

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.

predictor: 1 = copy, 2 = tiff, other = inline PNG predictor

columns: width of image in pixels

colors: number of components.

bpc: bits per component (typically 8)

◆ fz_open_range_filter()

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_open_rld()

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_open_sgilog16()

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_open_sgilog24()

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_open_sgilog32()

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_open_thunder()

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.