We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d3df39d + 2e4c12c commit 42db804Copy full SHA for 42db804
2 files changed
adafruit_imageload/bmp/indexed.py
@@ -62,6 +62,8 @@ def load(file, width, height, data_start, colors, color_depth, *, bitmap=None, p
62
bitmap = bitmap(width, height, colors)
63
file.seek(data_start)
64
line_size = width // (8 // color_depth)
65
+ if width % (8 // color_depth) != 0:
66
+ line_size += 1
67
if line_size % 4 != 0:
68
line_size += (4 - line_size % 4)
69
examples/images/1bit-not-byte-aligned.bmp
1.69 KB
0 commit comments