Return a |Jfif| instance having header properties parsed from image in `stream`.
(cls, stream)
| 49 | |
| 50 | @classmethod |
| 51 | def from_stream(cls, stream): |
| 52 | """Return a |Jfif| instance having header properties parsed from image in |
| 53 | `stream`.""" |
| 54 | markers = _JfifMarkers.from_stream(stream) |
| 55 | |
| 56 | px_width = markers.sof.px_width |
| 57 | px_height = markers.sof.px_height |
| 58 | horz_dpi = markers.app0.horz_dpi |
| 59 | vert_dpi = markers.app0.vert_dpi |
| 60 | |
| 61 | return cls(px_width, px_height, horz_dpi, vert_dpi) |
| 62 | |
| 63 | |
| 64 | class _JfifMarkers: |
nothing calls this directly
no test coverage detected