@@ -256,23 +256,6 @@ PyObject* JM_EscapeStrFromBuffer(fz_buffer* buff)
256
256
return val;
257
257
}
258
258
259
- // Only used for mupdf < 1.24. mupdf >= 1.24 has pdf_rearrange_pages2().
260
- void rearrange_pages2 (
261
- mupdf::PdfDocument& doc,
262
- PyObject *new_pages
263
- )
264
- {
265
- int len = (int ) PyTuple_Size (new_pages);
266
- int *pages = (int *) malloc ((int ) len * sizeof (int ));
267
- int i;
268
- for (i = 0 ; i < len; i++) {
269
- pages[i] = (int ) PyLong_AsLong (PyTuple_GET_ITEM (new_pages, (Py_ssize_t) i));
270
- }
271
- mupdf::pdf_rearrange_pages (doc, len, pages);
272
- free (pages);
273
- }
274
-
275
-
276
259
// ----------------------------------------------------------------------------
277
260
// Deep-copies a source page to the target.
278
261
// Modified version of function of pdfmerge.c: we also copy annotations, but
@@ -3973,40 +3956,6 @@ no_more_matches:;
3973
3956
return quads;
3974
3957
}
3975
3958
3976
- /* MuPDF-1.23.x has an incorrect and unusable
3977
- fz_new_image_from_compressed_buffer() wrapper that thinks the `decode` and
3978
- `colorkey` args are out-params. So we provide an alternative wrapper where
3979
- we always set these to args to null, which is sufficient for PyMuPDF caller
3980
- `Document._insert_image()`. */
3981
- fz_image* fz_new_image_from_compressed_buffer (
3982
- int w,
3983
- int h,
3984
- int bpc,
3985
- fz_colorspace *colorspace,
3986
- int xres,
3987
- int yres,
3988
- int interpolate,
3989
- int imagemask,
3990
- fz_compressed_buffer *buffer,
3991
- fz_image *mask
3992
- )
3993
- {
3994
- return mupdf::ll_fz_new_image_from_compressed_buffer (
3995
- w,
3996
- h,
3997
- bpc,
3998
- colorspace,
3999
- xres,
4000
- yres,
4001
- interpolate,
4002
- imagemask,
4003
- nullptr ,
4004
- nullptr ,
4005
- buffer,
4006
- mask
4007
- );
4008
- }
4009
-
4010
3959
%}
4011
3960
4012
3961
/* Declarations for functions defined above. */
@@ -4129,18 +4078,3 @@ int pixmap_n(mupdf::FzPixmap& pixmap);
4129
4078
PyObject* JM_search_stext_page (fz_stext_page *page, const char *needle);
4130
4079
4131
4080
PyObject *set_pixel (fz_pixmap* pm, int x, int y, PyObject *color);
4132
-
4133
- fz_image* fz_new_image_from_compressed_buffer (
4134
- int w,
4135
- int h,
4136
- int bpc,
4137
- fz_colorspace *colorspace,
4138
- int xres,
4139
- int yres,
4140
- int interpolate,
4141
- int imagemask,
4142
- fz_compressed_buffer *buffer,
4143
- fz_image *mask
4144
- );
4145
-
4146
- void rearrange_pages2 ( mupdf::PdfDocument& doc, PyObject *new_pages);
0 commit comments