We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4a4c5a commit f6ddfceCopy full SHA for f6ddfce
adafruit_imageload/bmp/truecolor.py
@@ -52,6 +52,8 @@ def load(
52
converter_obj = None
53
bitmap_obj = None
54
if bitmap:
55
+ # Set up a ColorConverter object and set appropriate colorspace
56
+ # to convert from based on the color depth
57
input_colorspace = Colorspace.RGB888
58
if color_depth == 16:
59
input_colorspace = Colorspace.RGB555
@@ -65,6 +67,7 @@ def load(
65
67
bitmap_obj = bitmap(width, abs(height), 65535)
66
68
file.seek(data_start)
69
line_size = width * (color_depth // 8)
70
+ # Set the seek direction based on whether the height value is negative or positive
71
if height > 0:
72
range1 = height - 1
73
range2 = -1
0 commit comments