mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-13 03:34:35 +00:00
Update generate_world_map.bin.py
Fix for https://github.com/eried/portapack-mayhem/issues/217
This commit is contained in:
parent
94fcab19d9
commit
47c5c1e9e5
@ -33,6 +33,8 @@ pix = im.load()
|
||||
outfile.write(struct.pack('H', im.size[0]))
|
||||
outfile.write(struct.pack('H', im.size[1]))
|
||||
|
||||
print("Generating: \t" + outfile.name + "\n from\t\t" + im.filename + "\n please wait...");
|
||||
|
||||
for y in range (0, im.size[1]):
|
||||
line = ''
|
||||
for x in range (0, im.size[0]):
|
||||
@ -45,6 +47,8 @@ for y in range (0, im.size[1]):
|
||||
# pixel_lcd = (pix[x, y][0] >> 5) << 5
|
||||
# pixel_lcd |= (pix[x, y][1] >> 5) << 2
|
||||
# pixel_lcd |= (pix[x, y][2] >> 6)
|
||||
line += struct.pack('H', pixel_lcd)
|
||||
outfile.write(line)
|
||||
line += str(struct.pack('H', pixel_lcd))
|
||||
outfile.write(line.encode('utf-8'))
|
||||
print(str(y) + '/' + str(im.size[1]) + '\r', end="")
|
||||
|
||||
print("Ready.");
|
||||
|
Loading…
Reference in New Issue
Block a user