From 8e7ebc940f6d02932968097b6ae484366530f5ec Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sat, 26 Jun 2021 20:36:59 -0600 Subject: [PATCH] Preserve alpha channel during resize --- jarvis/cogs/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jarvis/cogs/image.py b/jarvis/cogs/image.py index 5f633e8..b164e78 100644 --- a/jarvis/cogs/image.py +++ b/jarvis/cogs/image.py @@ -59,7 +59,7 @@ class ImageCog(commands.Cog): ratio = size / tgt_size buffer = np.frombuffer(file, dtype=np.uint8) - img = cv2.imdecode(buffer, flags=1) + img = cv2.imdecode(buffer, flags=-1) width = int(img.shape[1] * ratio) height = int(img.shape[0] * ratio)