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

Method _process_bKGD

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

FormatErrorClass · 0.85
unpackMethod · 0.45

Tested by

no test coverage detected