From a6689312cf63c7163067245479f48ad754f87a3c Mon Sep 17 00:00:00 2001 From: Lephe Date: Mon, 12 Jul 2021 20:07:48 +0200 Subject: [PATCH] master.py: enforce non-antialised upscaling of trophy icons Either the default changed in PIL, the mode of the source image was affected, or something else. --- master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master.py b/master.py index 86fb429..b6f0314 100755 --- a/master.py +++ b/master.py @@ -228,7 +228,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)) + yield icon.resize((48,48), resample=Image.NEAREST) for (name, icon) in zip(names, trophy_iterator(img)): icon.save(os.path.join(dst, f"{name}.png"))