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

Method warp

src/__init__.py:14086–14092  ·  view source on GitHub ↗

Return pixmap from a warped quad.

(self, quad, width, height)

Source from the content-addressed store, hash-verified

14084 return mupdf.fz_pixmap_width(self.this)
14085
14086 def warp(self, quad, width, height):
14087 """Return pixmap from a warped quad."""
14088 if not quad.is_convex: raise ValueError("quad must be convex")
14089 q = JM_quad_from_py(quad)
14090 points = [ q.ul, q.ur, q.lr, q.ll]
14091 dst = mupdf.fz_warp_pixmap( self.this, points, width, height)
14092 return Pixmap( dst)
14093
14094 @property
14095 def x(self):

Callers

nothing calls this directly

Calls 2

JM_quad_from_pyFunction · 0.85
PixmapClass · 0.85

Tested by

no test coverage detected