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

Method _dimensions_from_stream

src/docx/image/gif.py:33–38  ·  view source on GitHub ↗
(cls, stream)

Source from the content-addressed store, hash-verified

31
32 @classmethod
33 def _dimensions_from_stream(cls, stream):
34 stream.seek(6)
35 bytes_ = stream.read(4)
36 struct = Struct("<HH")
37 px_width, px_height = struct.unpack(bytes_)
38 return px_width, px_height

Callers 1

from_streamMethod · 0.80

Calls 2

seekMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected