From f8426feb610b10b0d884698dd52fa464bc34ccf6 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Mon, 2 Sep 2024 16:40:58 +0000 Subject: [PATCH] Formating --- esphome/components/image/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/image/__init__.py b/esphome/components/image/__init__.py index 4a92ed25c5..bf11f506f5 100644 --- a/esphome/components/image/__init__.py +++ b/esphome/components/image/__init__.py @@ -260,6 +260,7 @@ def load_svg_image(file: bytes, resize: tuple[int, int]): return Image.open(io.BytesIO(svg_image)) + def invert_image_colors(image): from PIL import Image @@ -271,6 +272,7 @@ def invert_image_colors(image): r, g, b = map(invert, (r, g, b)) return Image.merge(image.mode, (r, g, b, a)) + async def to_code(config): # Local import only to allow "validate_pillow_installed" to run *before* importing it from PIL import Image