I think this was introduced with #14. Just run library example to demonstrate:
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit PyPortal with samd51j20
>>> import bitmapsaver_simpletest
Setting up SD card
Building sample bitmap and palette
Saving bitmap
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bitmapsaver_simpletest.py", line 54, in <module>
File "adafruit_bitmapsaver.py", line 142, in save_pixels
File "adafruit_bitmapsaver.py", line 140, in save_pixels
File "adafruit_bitmapsaver.py", line 102, in _write_pixels
NameError: local variable referenced before assignment
>>>
If a bitmap is passed in, result_buffer is not used, but the resetting of result_buffer is happening outside that logic.
I think this was introduced with #14. Just run library example to demonstrate:
If a bitmap is passed in,
result_buffer
is not used, but the resetting ofresult_buffer
is happening outside that logic.