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

Method from_stream

src/docx/image/jpeg.py:92–101  ·  view source on GitHub ↗

Return a |_JfifMarkers| instance containing a |_JfifMarker| subclass instance for each marker in `stream`.

(cls, stream)

Source from the content-addressed store, hash-verified

90
91 @classmethod
92 def from_stream(cls, stream):
93 """Return a |_JfifMarkers| instance containing a |_JfifMarker| subclass instance
94 for each marker in `stream`."""
95 marker_parser = _MarkerParser.from_stream(stream)
96 markers = []
97 for marker in marker_parser.iter_markers():
98 markers.append(marker)
99 if marker.marker_code == JPEG_MARKER_CODE.SOS:
100 break
101 return cls(markers)
102
103 @property
104 def app0(self):

Callers

nothing calls this directly

Calls 3

iter_markersMethod · 0.80
appendMethod · 0.80
from_streamMethod · 0.45

Tested by

no test coverage detected