https://github.com/ameisso found an issue (probably on MacOS?)

The script keeps crashing when I export PNG from photoshop even if the finder gives me the right size.
This is correcting the issue
https://github.com/jnweiger/led-name-badge-ls32/pull/20

I am picking the one line important line, that should fix it.
rebase020124
Juergen Weigert 4 years ago
parent 218b9000df
commit 050cfb2e43
  1. 2
      led-badge-11x44.py

@ -335,7 +335,7 @@ def bitmap_img(file):
for bit in range(8): # [0..7] for bit in range(8): # [0..7]
bit_val = 0 bit_val = 0
x = 8*col+bit x = 8*col+bit
if x < im.width: if x < im.width and row < im.height:
pixel_color = im.getpixel( (x, row) ) pixel_color = im.getpixel( (x, row) )
if isinstance(pixel_color, tuple): if isinstance(pixel_color, tuple):
monochrome_color = sum(pixel_color[:3]) / len(pixel_color[:3]) monochrome_color = sum(pixel_color[:3]) / len(pixel_color[:3])

Loading…
Cancel
Save