im.getpixel( (x, row) fails when col is not a multiple of 8 and x exceeds col size of image.
[OK]
$ python3 led-badge-11x44.py gfx/fablab_logo_16x11.png
using [LSicroelectronics LS32 Custm HID] int=-1 page=1 via pyHIDAPI
fetching bitmap from file gfx/fablab_logo_16x11.png -> (16 x 11)
Type: 11x44
[NG]
$ python3 led-badge-11x44.py gfx/fablab_logo_11x11.png
using [LSicroelectronics LS32 Custm HID] int=-1 page=1 via pyHIDAPI
fetching bitmap from file gfx/fablab_logo_11x11.png -> (11 x 11)
Traceback (most recent call last):
File "led-badge-11x44.py", line 469, in
msgs.append(bitmap(arg))
File "led-badge-11x44.py", line 351, in bitmap
return bitmap_img(arg)
File "led-badge-11x44.py", line 331, in bitmap_img
pixel_color = im.getpixel( (x, row) )
File "/usr/local/lib/python3.6/site-packages/PIL/Image.py", line 1377, in getpixel
return self.im.getpixel(xy)
IndexError: image index out of range
im.getpixel( (x, row) fails when col is not a multiple of 8 and x exceeds col size of image.
[OK] $ python3 led-badge-11x44.py gfx/fablab_logo_16x11.png using [LSicroelectronics LS32 Custm HID] int=-1 page=1 via pyHIDAPI fetching bitmap from file gfx/fablab_logo_16x11.png -> (16 x 11) Type: 11x44
[NG] $ python3 led-badge-11x44.py gfx/fablab_logo_11x11.png using [LSicroelectronics LS32 Custm HID] int=-1 page=1 via pyHIDAPI fetching bitmap from file gfx/fablab_logo_11x11.png -> (11 x 11) Traceback (most recent call last): File "led-badge-11x44.py", line 469, in
msgs.append(bitmap(arg))
File "led-badge-11x44.py", line 351, in bitmap
return bitmap_img(arg)
File "led-badge-11x44.py", line 331, in bitmap_img
pixel_color = im.getpixel( (x, row) )
File "/usr/local/lib/python3.6/site-packages/PIL/Image.py", line 1377, in getpixel
return self.im.getpixel(xy)
IndexError: image index out of range