From a29b85059d78606ddda543d817bd9d81939cffff Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Sat, 19 Nov 2022 01:17:56 -0600 Subject: [PATCH] Remove webp conversion, PIL doesn't need it!!! --- requirements.txt | 1 - src/images.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index e1b34df..fb4a8a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,5 +25,4 @@ trio==0.22.0 trio-websocket==0.9.2 urllib3==1.26.12 uuid==1.30 -webptools==0.0.9 wsproto==1.2.0 diff --git a/src/images.py b/src/images.py index 1af171f..bdc8b79 100644 --- a/src/images.py +++ b/src/images.py @@ -37,9 +37,7 @@ def loadout_to_b64(loadout: List[str]) -> str: frames: List[Image.Image] = [] for img_url in loadout: path = download_image(img_url) - # Convert webp to png - dwebp(input_image=path, output_image=f"{path}.png", option="-o") - frames.append(Image.open(path).resize((24, 24))) + frames.append(Image.open(path).convert("RGBA").resize((24, 24))) gif_path = rel_to_abspath("../temp.gif") frames[0].save(