MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / test_3087

Function test_3087

tests/test_insertimage.py:49–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 )
48
49def test_3087():
50 path = os.path.abspath(f'{__file__}/../../tests/resources/test_3087.pdf')
51
52 doc = pymupdf.open(path)
53 page = doc[0]
54 print(page.get_images())
55 base = doc.extract_image(5)["image"]
56 mask = doc.extract_image(5)["image"]
57 page = doc.new_page()
58 page.insert_image(page.rect, stream=base, mask=mask)
59
60 doc = pymupdf.open(path)
61 page = doc[0]
62 print(page.get_images())
63 base = doc.extract_image(5)["image"]
64 mask = doc.extract_image(6)["image"]
65 page = doc.new_page()
66 page.insert_image(page.rect, stream=base, mask=mask)

Callers

nothing calls this directly

Calls 4

get_imagesMethod · 0.80
extract_imageMethod · 0.80
new_pageMethod · 0.80
insert_imageMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…