From 7229fe631d5aa3b2cf7e73948b12ea93ff52587d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 21 Mar 2021 13:37:38 -0500 Subject: [PATCH] Fix reading 4-bit data --- shared-module/bitmaptools/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/bitmaptools/__init__.c b/shared-module/bitmaptools/__init__.c index 5f105ea331..53f5877c32 100644 --- a/shared-module/bitmaptools/__init__.c +++ b/shared-module/bitmaptools/__init__.c @@ -464,7 +464,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f int byte_offset = x / 2; int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : x % 2); - value = (rowdata8[byte_offset] >> bit_offset) & 7; + value = (rowdata8[byte_offset] >> bit_offset) & 15; break; } case 8: