Skip to content

Commit 204d8b0

Browse files
committed
Use memoryview for bitmap widths that it works for
1 parent 3938d4c commit 204d8b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_imageload/png.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def load( # noqa: PLR0912, PLR0915, Too many branches, Too many statements
110110
for y in range(height):
111111
dst = y * scanline
112112
src = y * (scanline + 1) + 1
113-
if depth <= 8:
113+
if depth < 8 or (depth == 8 and width % 4 != 0):
114114
# Work around the bug in displayio.Bitmap
115115
# https://github.com/adafruit/circuitpython/issues/6675
116116
pixels_per_byte = 8 // depth

0 commit comments

Comments
 (0)