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

Method _process_PLTE

_plotly_utils/png.py:1718–1728  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 1

FormatErrorClass · 0.85

Tested by

no test coverage detected