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

Method parse

src/docx/image/tiff.py:46–52  ·  view source on GitHub ↗

Return an instance of |_TiffParser| containing the properties parsed from the TIFF image in `stream`.

(cls, stream)

Source from the content-addressed store, hash-verified

44
45 @classmethod
46 def parse(cls, stream):
47 """Return an instance of |_TiffParser| containing the properties parsed from the
48 TIFF image in `stream`."""
49 stream_rdr = cls._make_stream_reader(stream)
50 ifd0_offset = stream_rdr.read_long(4)
51 ifd_entries = _IfdEntries.from_stream(stream_rdr, ifd0_offset)
52 return cls(ifd_entries)
53
54 @property
55 def horz_dpi(self):

Callers 1

from_streamMethod · 0.45

Calls 3

_make_stream_readerMethod · 0.80
read_longMethod · 0.80
from_streamMethod · 0.45

Tested by

no test coverage detected