From b57417805b24cedd3a1e695498c587f80744b0e2 Mon Sep 17 00:00:00 2001 From: nex Date: Mon, 5 Feb 2024 23:39:46 +0000 Subject: [PATCH] convert to... RGBA? --- cogs/extremism.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/extremism.py b/cogs/extremism.py index 30723f9..8ef3873 100644 --- a/cogs/extremism.py +++ b/cogs/extremism.py @@ -27,10 +27,10 @@ def resize_gif(img: PIL.Image.Image, width: int, height: int) -> PIL.Image.Image def _overlay_images( background: PIL.Image.Image, foreground: PIL.Image.Image, mode=blend_modes.overlay, opacity: float = 1.0 ) -> PIL.Image.Image: - # background = background.convert("RGBA") - # foreground = foreground.convert("RGBA") background.load() foreground.load() + background = background.convert("RGBA") + foreground = foreground.convert("RGBA") background_img = numpy.array(background) background_img_float = background_img.astype(float) foreground_img = numpy.array(foreground)