forked from devs/PCv5
Update to follow Pillow evolution
This commit is contained in:
parent
112d06e3d6
commit
2089398773
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue