Skip to content

Commit f6ddfce

Browse files
committed
Add some comments
1 parent c4a4c5a commit f6ddfce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_imageload/bmp/truecolor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def load(
5252
converter_obj = None
5353
bitmap_obj = None
5454
if bitmap:
55+
# Set up a ColorConverter object and set appropriate colorspace
56+
# to convert from based on the color depth
5557
input_colorspace = Colorspace.RGB888
5658
if color_depth == 16:
5759
input_colorspace = Colorspace.RGB555
@@ -65,6 +67,7 @@ def load(
6567
bitmap_obj = bitmap(width, abs(height), 65535)
6668
file.seek(data_start)
6769
line_size = width * (color_depth // 8)
70+
# Set the seek direction based on whether the height value is negative or positive
6871
if height > 0:
6972
range1 = height - 1
7073
range2 = -1

0 commit comments

Comments
 (0)