(self, data)
| 1728 | raise FormatError("Empty PLTE is not allowed.") |
| 1729 | |
| 1730 | def _process_bKGD(self, data): |
| 1731 | try: |
| 1732 | if self.colormap: |
| 1733 | if not self.plte: |
| 1734 | warnings.warn("PLTE chunk is required before bKGD chunk.") |
| 1735 | self.background = struct.unpack("B", data) |
| 1736 | else: |
| 1737 | self.background = struct.unpack("!%dH" % self.color_planes, data) |
| 1738 | except struct.error: |
| 1739 | raise FormatError("bKGD chunk has incorrect length.") |
| 1740 | |
| 1741 | def _process_tRNS(self, data): |
| 1742 | # http://www.w3.org/TR/PNG/#11tRNS |
nothing calls this directly
no test coverage detected