MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / test_bboxlog

Function test_bboxlog

tests/test_imagebbox.py:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_bboxlog():
38 doc = pymupdf.open()
39 page = doc.new_page()
40 xref = page.insert_image(page.rect, filename=image)
41 img_info = page.get_image_info(xrefs=True)
42 assert len(img_info) == 1
43 info = img_info[0]
44 assert info["xref"] == xref
45 bbox_log = page.get_bboxlog()
46 assert len(bbox_log) == 1
47 box_type, bbox = bbox_log[0]
48 assert box_type == "fill-image"
49 assert bbox == info["bbox"]

Callers

nothing calls this directly

Calls 4

new_pageMethod · 0.80
insert_imageMethod · 0.80
get_image_infoMethod · 0.80
get_bboxlogMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…