Merge pull request #4454 from jepler/bitmaptools-readinto-4bit
Fix reading 4-bit data
This commit is contained in:
commit
a05aab8304
@ -441,7 +441,7 @@ void common_hal_bitmaptools_readinto(displayio_bitmap_t *self, pyb_file_obj_t *f
|
|||||||
int byte_offset = x / 2;
|
int byte_offset = x / 2;
|
||||||
int bit_offset = 4 * (reverse_pixels_in_element ? (1 - x % 2) : 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) & 0xf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
|
Loading…
Reference in New Issue
Block a user