Skip to content

Commit

Permalink
Apply create_mask only some cases.
Browse files Browse the repository at this point in the history
Only for WAVESHARE and WEATHER_INVERT
  • Loading branch information
gantonayde committed Oct 6, 2022
1 parent c40363b commit a302b0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inkyshot/update-display.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a302b0a

Please sign in to comment.