Skip to content

Commit be7d810

Browse files
committed
Add comment about copying buffers being slow
See v923z/micropython-ulab#726
1 parent 81f7cb1 commit be7d810

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cv2_drivers/displays/cv2_display.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def _write_image_to_buffer_bgr565(self, image_roi, buffer_roi):
8282
if ch == 1: # Grayscale
8383
buffer_roi = cv2.cvtColor(image_roi, cv2.COLOR_GRAY2BGR565, buffer_roi)
8484
elif ch == 2: # Already in BGR565 format
85+
# For some reason, this is relatively slow and creates a new buffer:
86+
# https://github.com/v923z/micropython-ulab/issues/726
8587
buffer_roi[:] = image_roi
8688
elif ch == 3: # BGR
8789
buffer_roi = cv2.cvtColor(image_roi, cv2.COLOR_BGR2BGR565, buffer_roi)

0 commit comments

Comments
 (0)