Skip to content

Commit 2e96d5d

Browse files
julian-smith-artifex-comJorjMcKie
authored andcommitted
src/extra.i: removed code for mupdf prior to 1.24.0.
1 parent ed30608 commit 2e96d5d

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

src/extra.i

-66
Original file line numberDiff line numberDiff line change
@@ -256,23 +256,6 @@ PyObject* JM_EscapeStrFromBuffer(fz_buffer* buff)
256256
return val;
257257
}
258258

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-
276259
//----------------------------------------------------------------------------
277260
// Deep-copies a source page to the target.
278261
// Modified version of function of pdfmerge.c: we also copy annotations, but
@@ -3973,40 +3956,6 @@ no_more_matches:;
39733956
return quads;
39743957
}
39753958

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-
40103959
%}
40113960

40123961
/* Declarations for functions defined above. */
@@ -4129,18 +4078,3 @@ int pixmap_n(mupdf::FzPixmap& pixmap);
41294078
PyObject* JM_search_stext_page(fz_stext_page *page, const char *needle);
41304079

41314080
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

Comments
 (0)