Iterator that yields all the ``IDAT`` chunks as strings.
()
| 1799 | """ |
| 1800 | |
| 1801 | def iteridat(): |
| 1802 | """Iterator that yields all the ``IDAT`` chunks as strings.""" |
| 1803 | while True: |
| 1804 | type, data = self.chunk(lenient=lenient) |
| 1805 | if type == b"IEND": |
| 1806 | # http://www.w3.org/TR/PNG/#11IEND |
| 1807 | break |
| 1808 | if type != b"IDAT": |
| 1809 | continue |
| 1810 | # type == b'IDAT' |
| 1811 | # http://www.w3.org/TR/PNG/#11IDAT |
| 1812 | if self.colormap and not self.plte: |
| 1813 | warnings.warn("PLTE chunk is required before IDAT chunk") |
| 1814 | yield data |
| 1815 | |
| 1816 | self.preamble(lenient=lenient) |
| 1817 | raw = decompress(iteridat()) |