Closed Johennes closed 4 years ago
ok cool - small request - put the numpy import into image_to_data
so that this code will still run on circuitpyboards that don't have numpy available!
Ah sorry, didn't realize that was a requirement. I wasn't able to put the import inside of image_to_data
since that is used as a generator for list
. Instead I made the top-level import conditional and changed image
to use the old double loop when Numpy was not imported.
rad thanks!
I should be able to test in the next couple of days after I get back.
This brings back the Numpy approach to converting pixel data for the SPI interface from the original Adafruit_Python_ILI9341 library. The use of Numpy instead of the previous double loop results in a performance boost of a factor >10 when testing on a Raspberry Pi Zero.
Fixes #46