From 2089398773f9aa8421df6db60f1ba8cbb0e4665d Mon Sep 17 00:00:00 2001 From: Darks Date: Sat, 17 Dec 2022 22:11:36 +0100 Subject: [PATCH] Update to follow Pillow evolution --- master.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/master.py b/master.py index 9cf9252..3153ef6 100755 --- a/master.py +++ b/master.py @@ -13,6 +13,7 @@ import yaml import slugify import readline from PIL import Image +from PIL.Image import Resampling help_msg = """ @@ -269,7 +270,7 @@ def generate_trophy_icons(): icon = img.crop((26*x+1, 26*y+1, 26*x+25, 26*y+25)) # Skip blank squares in the source image if len(icon.getcolors()) > 1: - yield icon.resize((48,48), resample=Image.NEAREST) + yield icon.resize((48,48), resample=Resampling.NEAREST) for (name, icon) in zip(names, trophy_iterator(img)): icon.save(os.path.join(dst, f"{name}.png"))