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

Function test_3134

tests/test_pixmap.py:254–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252 )
253
254def test_3134():
255 doc = pymupdf.Document()
256 page = doc.new_page()
257 page.get_pixmap(clip=pymupdf.Rect(0, 0, 100, 100)).save("test_3134_rect.jpg")
258 page.get_pixmap(clip=pymupdf.IRect(0, 0, 100, 100)).save("test_3134_irect.jpg")
259 stat_rect = os.stat('test_3134_rect.jpg')
260 stat_irect = os.stat('test_3134_irect.jpg')
261 print(f' {stat_rect=}')
262 print(f'{stat_irect=}')
263 assert stat_rect.st_size == stat_irect.st_size
264
265def test_3177():
266 path = os.path.abspath(f'{__file__}/../../tests/resources/img-transparent.png')

Callers

nothing calls this directly

Calls 3

new_pageMethod · 0.95
saveMethod · 0.45
get_pixmapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…