diff --git a/cc-pic.py b/cc-pic.py index f5eba3a..0cd0965 100644 --- a/cc-pic.py +++ b/cc-pic.py @@ -76,12 +76,12 @@ class Converter: def export_binary(self, io: BinaryIO): io.write(b"CCPI") io.write(bytes([self._img.width // 2, self._img.height // 3, 0])) - io.write(bytes(self._palette)) + io.write(bytes(self._palette[: 16 * 3])) for y in range(0, self._img.height - 2, 3): for x in range(0, self._img.width - 1, 2): ch, bg, fg = self._get_block(x, y) io.write(bytes([ - ch & 0xFF, + (ch + 0x80) & 0xFF, fg << 4 | bg ])) diff --git a/rat.cpi b/rat.cpi index 8ffb53b..23a6435 100644 Binary files a/rat.cpi and b/rat.cpi differ