diff options
author | 2021-03-10 19:33:30 +0000 | |
---|---|---|
committer | 2021-03-10 19:33:30 +0000 | |
commit | 3d54a88ee1d7fd5d9ece91ecea998e8da107ff22 (patch) | |
tree | 37791eae8fe67d0a78d098b7b563a304128ae2a2 | |
parent | Move colours to constants (diff) |
Improve docstring and split line for readibility
-rw-r--r-- | bot/exts/evergreen/profile_pic_modification/_effects.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bot/exts/evergreen/profile_pic_modification/_effects.py b/bot/exts/evergreen/profile_pic_modification/_effects.py index b0d50f4b..3f4e796d 100644 --- a/bot/exts/evergreen/profile_pic_modification/_effects.py +++ b/bot/exts/evergreen/profile_pic_modification/_effects.py @@ -88,8 +88,14 @@ class PfpEffects: @staticmethod def eight_bitify_effect(image: Image) -> Image: - """Applies the 8bit effect to the given image.""" - image = image.resize((32, 32), resample=Image.NEAREST).resize((1024, 1024), resample=Image.NEAREST) + """ + Applies the 8bit effect to the given image. + + This is done by reducing the image to 32x32 and then back up to 1024x1024. + We then quantize the image before returning too. + """ + image = image.resize((32, 32), resample=Image.NEAREST) + image = image.resize((1024, 1024), resample=Image.NEAREST) return image.quantize() @staticmethod |