From a302b0a86e50f5ca6865a98387ae8ffbf5635a07 Mon Sep 17 00:00:00 2001 From: Genadi Naydenov Date: Thu, 6 Oct 2022 15:53:56 +0300 Subject: [PATCH] Apply create_mask only some cases. Only for WAVESHARE and WEATHER_INVERT --- inkyshot/update-display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inkyshot/update-display.py b/inkyshot/update-display.py index 2ba285e..f9c77db 100644 --- a/inkyshot/update-display.py +++ b/inkyshot/update-display.py @@ -114,9 +114,9 @@ def draw_weather(weather, img, scale, fill): icon_filename = f"{icon_map[icon_name]:02}{time_of_day}.png" filepath = Path(__file__).parent / 'weather-icons' / icon_filename icon_image = Image.open(filepath) - icon_mask = create_mask(icon_image) # Draw the weather icon if WEATHER_INVERT and WAVESHARE: + icon_mask = create_mask(icon_image) logging.info("Inverting Weather Icon") icon = Image.new('1', (100, 100), 255) icon.paste(icon_image, (0,0), icon_mask)