Usar zlib
This commit is contained in:
parent
7b732396e7
commit
02b763f4c6
4
image.py
4
image.py
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
from PIL import Image
|
||||
import zlib
|
||||
|
||||
invert = 0
|
||||
|
||||
|
@ -36,13 +37,14 @@ for bank in range(0, 8):
|
|||
c = c - 1
|
||||
buffer.append(value)
|
||||
|
||||
buffer = zlib.compress(bytes(buffer))
|
||||
|
||||
c = 0
|
||||
bytes_per_line = 10
|
||||
|
||||
print('#include "image.h"')
|
||||
print()
|
||||
print("uint8_t image[1024] = {")
|
||||
print("uint8_t image[" + str(len(buffer)) + "] = {")
|
||||
|
||||
for v in buffer:
|
||||
if c == 0:
|
||||
|
|
Loading…
Reference in New Issue