Return a |Tiff| instance containing the properties of the TIFF image in `stream`.
(cls, stream)
| 22 | |
| 23 | @classmethod |
| 24 | def from_stream(cls, stream): |
| 25 | """Return a |Tiff| instance containing the properties of the TIFF image in |
| 26 | `stream`.""" |
| 27 | parser = _TiffParser.parse(stream) |
| 28 | |
| 29 | px_width = parser.px_width |
| 30 | px_height = parser.px_height |
| 31 | horz_dpi = parser.horz_dpi |
| 32 | vert_dpi = parser.vert_dpi |
| 33 | |
| 34 | return cls(px_width, px_height, horz_dpi, vert_dpi) |
| 35 | |
| 36 | |
| 37 | class _TiffParser: |
no test coverage detected