1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-11 15:13:27 +02:00

update: use proper name for PIL image filter ANTIALIAS -> LANCZOS

ANTIALIAS was made an alias of LANCZOS in 2.7.0:
https://pillow.readthedocs.io/en/stable/releasenotes/2.7.0.html#antialias-renamed-to-lanczos

The ANTIALIAS alias was removed in Pillow 10.0.0:
https://pillow.readthedocs.io/en/stable/deprecations.html
This commit is contained in:
Hans-Christoph Steiner 2023-07-03 17:44:47 +02:00
parent 3db90b65fb
commit 132e953c8c

View File

@ -252,7 +252,7 @@ def resize_icon(iconpath, density):
if any(length > size for length in im.size):
oldsize = im.size
im.thumbnail((size, size), Image.ANTIALIAS)
im.thumbnail((size, size), Image.LANCZOS)
logging.debug("%s was too large at %s - new size is %s" % (
iconpath, oldsize, im.size))
im.save(iconpath, "PNG", optimize=True,
@ -1778,7 +1778,7 @@ def fill_missing_icon_densities(empty_densities, icon_filename, apk, repo_dir):
size = dpi_to_px(density)
im.thumbnail((size, size), Image.ANTIALIAS)
im.thumbnail((size, size), Image.LANCZOS)
im.save(icon_path, "PNG", optimize=True,
pnginfo=BLANK_PNG_INFO, icc_profile=None)
empty_densities.remove(density)