Skip to content

Commit e716587

Browse files
committed
move memory chunk instance into correct location in if branch
1 parent 2caf187 commit e716587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_imageload/bmp/indexed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def load(
8686
range3 = 1
8787

8888
if compression == 0:
89-
chunk = bytearray(line_size)
9089

9190
if _bitmap_readinto:
9291
_bitmap_readinto(
@@ -98,6 +97,7 @@ def load(
9897
reverse_rows=True,
9998
)
10099
else: # use the standard file.readinto
100+
chunk = bytearray(line_size)
101101
for y in range(range1, range2, range3):
102102
file.readinto(chunk)
103103
pixels_per_byte = 8 // color_depth

0 commit comments

Comments
 (0)