(self, data)
| 1716 | self.sbit = None |
| 1717 | |
| 1718 | def _process_PLTE(self, data): |
| 1719 | # http://www.w3.org/TR/PNG/#11PLTE |
| 1720 | if self.plte: |
| 1721 | warnings.warn("Multiple PLTE chunks present.") |
| 1722 | self.plte = data |
| 1723 | if len(data) % 3 != 0: |
| 1724 | raise FormatError("PLTE chunk's length should be a multiple of 3.") |
| 1725 | if len(data) > (2**self.bitdepth) * 3: |
| 1726 | raise FormatError("PLTE chunk is too long.") |
| 1727 | if len(data) == 0: |
| 1728 | raise FormatError("Empty PLTE is not allowed.") |
| 1729 | |
| 1730 | def _process_bKGD(self, data): |
| 1731 | try: |
nothing calls this directly
no test coverage detected