Half-Byte Packing for 4-Bit and Pixel Data Handler
(self,pixel)
| 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 """ |