MCPcopy Create free account
hub / github.com/ActiveState/code / HPIX

Method HPIX

recipes/Python/577379_BIRLE_Decoder/recipe-577379.py:66–76  ·  view source on GitHub ↗

Half-Byte Packing for 4-Bit and Pixel Data Handler

(self,pixel)

Source from the content-addressed store, hash-verified

64 self.DENCD(b0,b1)
65
66 def HPIX(self,pixel):
67 """ Half-Byte Packing for 4-Bit and Pixel Data Handler """
68 if self.bpp == 4:
69 if self.buf == "":
70 self.buf = chr(pixel<<4)
71 else:
72 self.buf = chr(ord(self.buf) | pixel)
73 self.tmp.write(self.buf)
74 self.buf = ""
75 else:
76 self.tmp.write(chr(pixel))
77
78 def EOSL(self,*arg):
79 """ 00 00: End Of Scan Line """

Callers 4

EOSLMethod · 0.95
MOFFMethod · 0.95
UENCDMethod · 0.95
DENCDMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected