Skip to content

Commit 02216c5

Browse files
authored
removed theight variable
removed theight variable changed code to use abs() function instead.
1 parent 5caff1f commit 02216c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

adafruit_imageload/bmp/indexed.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ def load(file, width, height, data_start, colors, color_depth, *, bitmap=None, p
6262
#convert unsigned int to signed int when height is negative
6363
if height > 0x7fffffff:
6464
height = height - 4294967296
65-
theight = height
66-
if theight < 0:
67-
theight = 0 - theight
68-
bitmap = bitmap(width, theight, colors)
65+
bitmap = bitmap(width, abs(height), colors)
6966
file.seek(data_start)
7067
line_size = width // (8 // color_depth)
7168
if width % (8 // color_depth) != 0:

0 commit comments

Comments
 (0)