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

Method xref_is_image

src/__init__.py:7990–7996  ·  view source on GitHub ↗

Check if xref is an image object.

(self, xref)

Source from the content-addressed store, hash-verified

7988 return False
7989
7990 def xref_is_image(self, xref):
7991 """Check if xref is an image object."""
7992 if self.is_closed or self.is_encrypted:
7993 raise ValueError("document closed or encrypted")
7994 if self.xref_get_key(xref, "Subtype")[1] == "/Image":
7995 return True
7996 return False
7997
7998 def xref_is_stream(self, xref=0):
7999 """Check if xref is a stream object."""

Callers 2

replace_imageMethod · 0.80
replace_imageFunction · 0.80

Calls 1

xref_get_keyMethod · 0.95

Tested by

no test coverage detected