MCPcopy Index your code
hub / github.com/python-openxml/python-docx / from_blob

Method from_blob

src/docx/image/image.py:29–33  ·  view source on GitHub ↗

Return a new |Image| subclass instance parsed from the image binary contained in `blob`.

(cls, blob: bytes)

Source from the content-addressed store, hash-verified

27
28 @classmethod
29 def from_blob(cls, blob: bytes) -> Image:
30 """Return a new |Image| subclass instance parsed from the image binary contained
31 in `blob`."""
32 stream = io.BytesIO(blob)
33 return cls._from_stream(stream, blob)
34
35 @classmethod
36 def from_file(cls, image_descriptor: str | IO[bytes]):

Callers 2

imageMethod · 0.80

Calls 1

_from_streamMethod · 0.80

Tested by 1