Skip to content

Commit f33b92a

Browse files
committed
fix PNG images wider than 128 bits
1 parent 4fee113 commit f33b92a

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 width > 128:
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)