mupdf
Loading...
Searching...
No Matches
filter.h
Go to the documentation of this file.
1// Copyright (C) 2004-2025 Artifex Software, Inc.
2//
3// This file is part of MuPDF.
4//
5// MuPDF is free software: you can redistribute it and/or modify it under the
6// terms of the GNU Affero General Public License as published by the Free
7// Software Foundation, either version 3 of the License, or (at your option)
8// any later version.
9//
10// MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Affero General Public License
16// along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17//
18// Alternative licensing terms are available from the licensor.
19// For commercial licensing, see <https://www.artifex.com/> or contact
20// Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21// CA 94129, USA, for further information.
22
23#ifndef MUPDF_FITZ_FILTER_H
24#define MUPDF_FITZ_FILTER_H
25
26#include "mupdf/fitz/system.h"
27#include "mupdf/fitz/context.h"
28#include "mupdf/fitz/buffer.h"
29#include "mupdf/fitz/store.h"
30#include "mupdf/fitz/stream.h"
31
33
34typedef struct
35{
36 int64_t offset;
37 uint64_t length;
38} fz_range;
39
44fz_stream *fz_open_null_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset);
45
50fz_stream *fz_open_range_filter(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges);
51
56fz_stream *fz_open_endstream_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset);
57
61fz_stream *fz_open_concat(fz_context *ctx, int max, int pad);
62
69
74fz_stream *fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);
75
80fz_stream *fz_open_aesd(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);
81
87
93
99
119fz_stream *fz_open_dctd(fz_context *ctx, fz_stream *chain, int color_transform, int invert_cmyk, int l2factor, fz_stream *jpegtables);
120
144 int k, int end_of_line, int encoded_byte_align,
145 int columns, int rows, int end_of_block, int black_is_1);
146
155fz_stream *fz_open_flated(fz_context *ctx, fz_stream *chain, int window_bits);
156
165
171
188fz_stream *fz_open_lzwd(fz_context *ctx, fz_stream *chain, int early_change, int min_bits, int reverse_bits, int old_tiff);
189
202fz_stream *fz_open_predict(fz_context *ctx, fz_stream *chain, int predictor, int columns, int colors, int bpc);
203
208fz_stream *fz_open_jbig2d(fz_context *ctx, fz_stream *chain, fz_jbig2_globals *globals, int embedded);
209
216
223
231
237
242
243/* Extra filters for tiff */
244
250
256
262
268
269#endif
fz_stream * fz_open_sgilog24(fz_context *ctx, fz_stream *chain, int w)
void fz_drop_jbig2_globals(fz_context *ctx, fz_jbig2_globals *globals)
fz_stream * fz_open_ahxd(fz_context *ctx, fz_stream *chain)
fz_jbig2_globals * fz_load_jbig2_globals(fz_context *ctx, fz_buffer *buf)
fz_stream * fz_open_brotlid(fz_context *ctx, fz_stream *chain)
fz_stream * fz_open_sgilog32(fz_context *ctx, fz_stream *chain, int w)
fz_stream * fz_open_dctd(fz_context *ctx, fz_stream *chain, int color_transform, int invert_cmyk, int l2factor, fz_stream *jpegtables)
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)
fz_stream * fz_open_thunder(fz_context *ctx, fz_stream *chain, int w)
struct fz_jbig2_globals fz_jbig2_globals
Definition filter.h:32
fz_stream * fz_open_range_filter(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges)
fz_stream * fz_open_libarchived(fz_context *ctx, fz_stream *chain)
fz_jbig2_globals * fz_keep_jbig2_globals(fz_context *ctx, fz_jbig2_globals *globals)
fz_stream * fz_open_concat(fz_context *ctx, int max, int pad)
fz_stream * fz_open_jbig2d(fz_context *ctx, fz_stream *chain, fz_jbig2_globals *globals, int embedded)
fz_stream * fz_open_aesd(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen)
fz_stream * fz_open_a85d(fz_context *ctx, fz_stream *chain)
fz_stream * fz_open_lzwd(fz_context *ctx, fz_stream *chain, int early_change, int min_bits, int reverse_bits, int old_tiff)
fz_stream * fz_open_null_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset)
void fz_concat_push_drop(fz_context *ctx, fz_stream *concat, fz_stream *chain)
fz_stream * fz_open_endstream_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset)
fz_stream * fz_open_predict(fz_context *ctx, fz_stream *chain, int predictor, int columns, int colors, int bpc)
fz_stream * fz_open_sgilog16(fz_context *ctx, fz_stream *chain, int w)
fz_stream * fz_open_flated(fz_context *ctx, fz_stream *chain, int window_bits)
fz_buffer * fz_jbig2_globals_data(fz_context *ctx, fz_jbig2_globals *globals)
fz_stream * fz_open_rld(fz_context *ctx, fz_stream *chain)
void fz_drop_jbig2_globals_imp(fz_context *ctx, fz_storable *globals)
fz_stream * fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen)
Definition buffer.h:41
Definition context.h:886
Definition filter.h:35
uint64_t length
Definition filter.h:37
int64_t offset
Definition filter.h:36
Definition store.h:76
Definition stream.h:320