Skip to content

Commit 8c75ca6

Browse files
tenboshijulian-smith-artifex-com
authored andcommitted
Remove duplicated code that was unnecessarily reinitializing variables.
pix = fitz.Pixmap(pix, width, height) File ".../pymupdf/__init__.py", line 9829, in __init__ spix, w, h, clip = args ValueError: not enough values to unpack (expected 4, got 3)
1 parent b4798a4 commit 8c75ca6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9828,9 +9828,7 @@ def __init__(self, *args):
98289828
spix, w, h, clip = args
98299829
bbox = JM_irect_from_py(clip)
98309830

9831-
spix, w, h, clip = args
98329831
src_pix = spix.this if isinstance(spix, Pixmap) else spix
9833-
bbox = JM_irect_from_py(clip)
98349832
if not mupdf.fz_is_infinite_irect(bbox):
98359833
pm = mupdf.fz_scale_pixmap(src_pix, src_pix.x(), src_pix.y(), w, h, bbox)
98369834
else:

0 commit comments

Comments
 (0)