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

Method copy

src/__init__.py:13608–13616  ·  view source on GitHub ↗

Copy bbox from another Pixmap.

(self, src, bbox)

Source from the content-addressed store, hash-verified

13606 return cs
13607
13608 def copy(self, src, bbox):
13609 """Copy bbox from another Pixmap."""
13610 pm = self.this
13611 src_pix = src.this
13612 if not mupdf.fz_pixmap_colorspace(src_pix):
13613 raise ValueError( "cannot copy pixmap with NULL colorspace")
13614 if pm.alpha() != src_pix.alpha():
13615 raise ValueError( "source and target alpha must be equal")
13616 mupdf.fz_copy_pixmap_rect(pm, src_pix, JM_irect_from_py(bbox), mupdf.FzDefaultColorspaces(None))
13617
13618 @property
13619 def digest(self):

Callers 5

runFunction · 0.80
set_tocMethod · 0.80
__init__.pyFile · 0.80
appendFunction · 0.80
mainFunction · 0.80

Calls 2

JM_irect_from_pyFunction · 0.85
alphaMethod · 0.80

Tested by

no test coverage detected