(self, data)
| 1776 | raise FormatError("sBIT chunk has incorrect length.") |
| 1777 | |
| 1778 | def _process_pHYs(self, data): |
| 1779 | # http://www.w3.org/TR/PNG/#11pHYs |
| 1780 | self.phys = data |
| 1781 | fmt = "!LLB" |
| 1782 | if len(data) != struct.calcsize(fmt): |
| 1783 | raise FormatError("pHYs chunk has incorrect length.") |
| 1784 | self.x_pixels_per_unit, self.y_pixels_per_unit, unit = struct.unpack(fmt, data) |
| 1785 | self.unit_is_meter = bool(unit) |
| 1786 | |
| 1787 | def read(self, lenient=False): |
| 1788 | """ |
nothing calls this directly
no test coverage detected