()
| 37 | |
| 38 | |
| 39 | def test_pdfpixmap(): |
| 40 | # pixmap from xref in a PDF |
| 41 | doc = pymupdf.open(pdf) |
| 42 | # take first image item of first page |
| 43 | img = doc.get_page_images(0)[0] |
| 44 | # make pixmap of it |
| 45 | pix = pymupdf.Pixmap(doc, img[0]) |
| 46 | # assert pixmap properties |
| 47 | assert pix.width == img[2] |
| 48 | assert pix.height == img[3] |
| 49 | # extract image and compare metadata |
| 50 | extractimg = doc.extract_image(img[0]) |
| 51 | assert extractimg["width"] == pix.width |
| 52 | assert extractimg["height"] == pix.height |
| 53 | |
| 54 | |
| 55 | def test_filepixmap(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…