MCPcopy Index your code
hub / github.com/plotly/plotly.py / process_chunk

Method process_chunk

_plotly_utils/png.py:1644–1659  ·  view source on GitHub ↗

Process the next chunk and its data. This only processes the following chunk types: ``IHDR``, ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``, ``pHYs``. All other chunk types are ignored. If the optional `lenient` argument evaluates to `True`, check

(self, lenient=False)

Source from the content-addressed store, hash-verified

1642 return length, type
1643
1644 def process_chunk(self, lenient=False):
1645 """
1646 Process the next chunk and its data.
1647 This only processes the following chunk types:
1648 ``IHDR``, ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``, ``pHYs``.
1649 All other chunk types are ignored.
1650
1651 If the optional `lenient` argument evaluates to `True`,
1652 checksum failures will raise warnings rather than exceptions.
1653 """
1654
1655 type, data = self.chunk(lenient=lenient)
1656 method = "_process_" + type.decode("ascii")
1657 m = getattr(self, method, None)
1658 if m:
1659 m(data)
1660
1661 def _process_IHDR(self, data):
1662 # http://www.w3.org/TR/PNG/#11IHDR

Callers 1

preambleMethod · 0.95

Calls 3

chunkMethod · 0.95
mFunction · 0.50
decodeMethod · 0.45

Tested by

no test coverage detected