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

Method from_stream

src/docx/image/jpeg.py:33–44  ·  view source on GitHub ↗

Return |Exif| instance having header properties parsed from Exif image in `stream`.

(cls, stream)

Source from the content-addressed store, hash-verified

31
32 @classmethod
33 def from_stream(cls, stream):
34 """Return |Exif| instance having header properties parsed from Exif image in
35 `stream`."""
36 markers = _JfifMarkers.from_stream(stream)
37 # print('\n%s' % markers)
38
39 px_width = markers.sof.px_width
40 px_height = markers.sof.px_height
41 horz_dpi = markers.app1.horz_dpi
42 vert_dpi = markers.app1.vert_dpi
43
44 return cls(px_width, px_height, horz_dpi, vert_dpi)
45
46
47class Jfif(Jpeg):

Callers 5

from_streamMethod · 0.45
from_streamMethod · 0.45
iter_markersMethod · 0.45
_MarkerFactoryFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected