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

Method from_stream

src/docx/image/jpeg.py:137–140  ·  view source on GitHub ↗

Return a |_MarkerParser| instance to parse JFIF markers from `stream`.

(cls, stream)

Source from the content-addressed store, hash-verified

135
136 @classmethod
137 def from_stream(cls, stream):
138 """Return a |_MarkerParser| instance to parse JFIF markers from `stream`."""
139 stream_reader = StreamReader(stream, BIG_ENDIAN)
140 return cls(stream_reader)
141
142 def iter_markers(self):
143 """Generate a (marker_code, segment_offset) 2-tuple for each marker in the JPEG

Callers

nothing calls this directly

Calls 1

StreamReaderClass · 0.90

Tested by

no test coverage detected