Return a _pHYsChunk instance containing the image resolution extracted from the pHYs chunk in `stream` at `offset`.
(cls, chunk_type, stream_rdr, offset)
| 233 | |
| 234 | @classmethod |
| 235 | def from_offset(cls, chunk_type, stream_rdr, offset): |
| 236 | """Return a _pHYsChunk instance containing the image resolution extracted from |
| 237 | the pHYs chunk in `stream` at `offset`.""" |
| 238 | horz_px_per_unit = stream_rdr.read_long(offset) |
| 239 | vert_px_per_unit = stream_rdr.read_long(offset, 4) |
| 240 | units_specifier = stream_rdr.read_byte(offset, 8) |
| 241 | return cls(chunk_type, horz_px_per_unit, vert_px_per_unit, units_specifier) |
| 242 | |
| 243 | @property |
| 244 | def horz_px_per_unit(self): |