Skip to content

Commit 15d9982

Browse files
src/__init__.py: fix construction of pixmap by scaling existing pixmap.
fitz.FzPixmap.x is an accessor function for the underlying fz_pixmap.x value so we need src_pix.x(), not src_pix.x. This addresses #3020.
1 parent cb07786 commit 15d9982

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9448,9 +9448,9 @@ def __init__(self, *args):
94489448
src_pix = spix.this if isinstance(spix, Pixmap) else spix
94499449
bbox = JM_irect_from_py(clip)
94509450
if not mupdf.fz_is_infinite_irect(bbox):
9451-
pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x, src_pix.y, w, h, bbox)
9451+
pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x(), src_pix.y(), w, h, bbox)
94529452
else:
9453-
pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x, src_pix.y, w, h, None)
9453+
pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x(), src_pix.y(), w, h, mupdf.FzIrect(mupdf.fz_infinite_irect))
94549454
self.this = pm
94559455

94569456
elif args_match(args, str, mupdf.FzPixmap) and args[0] == 'raw':

0 commit comments

Comments
 (0)