Skip to content

Commit

Permalink
src/__init__.py: fixed test_delete_image().
Browse files Browse the repository at this point in the history
To create mupdf.FzDefaultColorspaces with m_internal=null, need to
do mupdf.FzDefaultColorspaces(None). [FzDefaultColorspaces() uses
fz_new_default_colorspaces().]

To create mupdf.FzImage with m_internal=null, need to do `FzImage()`
[FzImage(0) will fail because ambiguous with single-arg constructors that takes
a buffer or a string.]
  • Loading branch information
julian-smith-artifex-com committed Jan 11, 2024
1 parent 4bc735d commit 3b2fedf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7753,13 +7753,13 @@ def _insert_image(self,
arg_pix,
mupdf.FzColorspace(0),
mupdf.FzColorspace(0),
mupdf.FzDefaultColorspaces(0),
mupdf.FzDefaultColorspaces(None),
mupdf.FzColorParams(),
1,
)
pm.alpha = 0
pm.colorspace = None
mask = mupdf.fz_new_image_from_pixmap(pm, mupdf.FzImage(0))
mask = mupdf.fz_new_image_from_pixmap(pm, mupdf.FzImage())
image = mupdf.fz_new_image_from_pixmap(arg_pix, mask)
#goto have_image()
do_process_stream = 0
Expand Down Expand Up @@ -9418,7 +9418,7 @@ def __init__(self, *args):
spix,
cs,
mupdf.FzColorspace(0),
mupdf.FzDefaultColorspaces(0),
mupdf.FzDefaultColorspaces(None),
mupdf.FzColorParams(),
1
)
Expand Down Expand Up @@ -21652,6 +21652,7 @@ def _atexit():
Document.set_toc_item = utils.set_toc_item
Document.subset_fonts = utils.subset_fonts
Document.tobytes = Document.write
Document.xref_copy = utils.xref_copy

IRect.get_area = utils.get_area

Expand Down

0 comments on commit 3b2fedf

Please sign in to comment.