From 02216c5646bd14c09b53a34a6b1bc79d9331ea71 Mon Sep 17 00:00:00 2001 From: Dan Cogliano Date: Mon, 12 Aug 2019 12:36:30 -0400 Subject: [PATCH] removed theight variable removed theight variable changed code to use abs() function instead. --- adafruit_imageload/bmp/indexed.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/adafruit_imageload/bmp/indexed.py b/adafruit_imageload/bmp/indexed.py index 3317e0a..5242dde 100644 --- a/adafruit_imageload/bmp/indexed.py +++ b/adafruit_imageload/bmp/indexed.py @@ -62,10 +62,7 @@ def load(file, width, height, data_start, colors, color_depth, *, bitmap=None, p #convert unsigned int to signed int when height is negative if height > 0x7fffffff: height = height - 4294967296 - theight = height - if theight < 0: - theight = 0 - theight - bitmap = bitmap(width, theight, colors) + bitmap = bitmap(width, abs(height), colors) file.seek(data_start) line_size = width // (8 // color_depth) if width % (8 // color_depth) != 0: