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

Method from_stream

src/docx/image/png.py:100–104  ·  view source on GitHub ↗

Return a |_Chunks| instance containing the PNG chunks in `stream`.

(cls, stream)

Source from the content-addressed store, hash-verified

98
99 @classmethod
100 def from_stream(cls, stream):
101 """Return a |_Chunks| instance containing the PNG chunks in `stream`."""
102 chunk_parser = _ChunkParser.from_stream(stream)
103 chunks = list(chunk_parser.iter_chunks())
104 return cls(chunks)
105
106 @property
107 def IHDR(self):

Callers

nothing calls this directly

Calls 2

iter_chunksMethod · 0.80
from_streamMethod · 0.45

Tested by

no test coverage detected