aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2021-08-21 12:47:42 +0100
committerGravatar wookie184 <[email protected]>2021-08-21 12:47:42 +0100
commit83eb6a6ea0bb8429504a0deddf3f6f2a2202547e (patch)
treeeaeb7746ea8146665a809724e068137005587306
parentMerge pull request #760 from Kronifer/main (diff)
Resize avatar to 1024x1024 before applying effects
-rw-r--r--bot/exts/evergreen/avatar_modification/_effects.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/evergreen/avatar_modification/_effects.py b/bot/exts/evergreen/avatar_modification/_effects.py
index 46d1a2ab..55eed6ad 100644
--- a/bot/exts/evergreen/avatar_modification/_effects.py
+++ b/bot/exts/evergreen/avatar_modification/_effects.py
@@ -22,6 +22,7 @@ class PfpEffects:
"""Applies the given effect to the image passed to it."""
im = Image.open(BytesIO(image_bytes))
im = im.convert("RGBA")
+ im = im.resize((1024, 1024))
im = effect(im, *args)
bufferedio = BytesIO()
@@ -74,7 +75,6 @@ class PfpEffects:
@staticmethod
def pridify_effect(image: Image.Image, pixels: int, flag: str) -> Image.Image:
"""Applies the given pride effect to the given image."""
- image = image.resize((1024, 1024))
image = PfpEffects.crop_avatar_circle(image)
ring = Image.open(Path(f"bot/resources/pride/flags/{flag}.png")).resize((1024, 1024))