forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Playing with ulab, I found it was costly to copy from an array to a display.bitmap.
ulab can build a buffer: ulab.array.tobytes
Here is the current fastest way I was able to copy:
image_bitmap = displayio.Bitmap(24, 32, number_of_colors)
inta=ulab.array((npframe-min_t)*factor,dtype=ulab.int8)
index = 0
for h in range(24):
for w in range(32):
image_bitmap[h, w] = inta[index]
index+=1