From 0d8cb6c42a09a4624dc8f8efdb4ac0add2f074a0 Mon Sep 17 00:00:00 2001 From: mrbwburns <> Date: Mon, 20 Nov 2023 17:29:46 +0100 Subject: [PATCH] no image processing on main remove the weather scraper call from the inky image module --- inkycal/main.py | 8 ++++---- inkycal/modules/inkycal_image.py | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/inkycal/main.py b/inkycal/main.py index 122a817..153d745 100644 --- a/inkycal/main.py +++ b/inkycal/main.py @@ -518,12 +518,12 @@ class Inkycal: def _optimize_im(image, threshold=220): """Optimize the image for rendering on ePaper displays""" - buffer = numpy.array(image.convert('RGB')) - red, green = buffer[:, :, 0], buffer[:, :, 1] + #buffer = numpy.array(image.convert('RGB')) + #red, green = buffer[:, :, 0], buffer[:, :, 1] # grey->black - buffer[numpy.logical_and(red <= threshold, green <= threshold)] = [0, 0, 0] - image = Image.fromarray(buffer) + #buffer[numpy.logical_and(red <= threshold, green <= threshold)] = [0, 0, 0] + #image = Image.fromarray(buffer) return image def calibrate(self): diff --git a/inkycal/modules/inkycal_image.py b/inkycal/modules/inkycal_image.py index dcd4b8d..37b4a1a 100755 --- a/inkycal/modules/inkycal_image.py +++ b/inkycal/modules/inkycal_image.py @@ -6,7 +6,6 @@ Copyright by aceinnolab """ from inkycal.modules.template import inkycal_module -from inkycal.modules.inkycal_openweather_scrape import get_scraped_weatherforecast_image from inkycal.custom import * from inkycal.modules.inky_image import Inkyimage as Images @@ -69,9 +68,6 @@ class Inkyimage(inkycal_module): print(f'{__name__} loaded') def generate_image(self): - """Call the openweather scraper""" - _,_ = get_scraped_weatherforecast_image() - """Generate image for this module""" # Define new image size with respect to padding