I run into the problem by accident while a generated an animation in 1-Bit mode (since I only need those colors).
using [LSicroelectronics LS32 Custm HID] bus=2 dev=11
fetching bitmap from file ../strip.png -> (1536 x 11)
Traceback (most recent call last):
File "led-badge-11x44.py", line 462, in <module>
msgs.append(bitmap(arg))
File "led-badge-11x44.py", line 345, in bitmap
return bitmap_text(arg)
File "led-badge-11x44.py", line 304, in bitmap_text
text = re.sub(r':([^:]*):', colonrepl, text)
File "/usr/lib/python3.7/re.py", line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "led-badge-11x44.py", line 299, in colonrepl
bitmap_preloaded.append(bitmap_img(name))
File "led-badge-11x44.py", line 331, in bitmap_img
if x < im.width and sum(im.getpixel( (x, row) )) > 384:
TypeError: 'int' object is not iterable
The pixel was here simply an int instead of a tuple. Even if the tuple would've contained one element, all pixels would've been recognized black anyway.
The changes also include discarding the alpha value which would've been able to change the calculated average color, too.
I run into the problem by accident while a generated an animation in 1-Bit mode (since I only need those colors).
The pixel was here simply an int instead of a tuple. Even if the tuple would've contained one element, all pixels would've been recognized black anyway.
The changes also include discarding the alpha value which would've been able to change the calculated average color, too.
Great software btw!