[UI] Replace deprecated Pillow Image.Antialias with Lanczos

ANTIALIAS was removed in Pillow 10.0.0 so replace with suggested
alternative.

Ref: https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants
This commit is contained in:
Calum Lind 2024-08-26 12:00:33 +01:00
parent 776efe4faa
commit d1d72b1be8
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ class TrackerIcons(Component):
with Image.open(filename) as img: with Image.open(filename) as img:
if img.size > (16, 16): if img.size > (16, 16):
new_filename = filename.rpartition('.')[0] + '.png' new_filename = filename.rpartition('.')[0] + '.png'
img = img.resize((16, 16), Image.ANTIALIAS) img = img.resize((16, 16), Image.Resampling.LANCZOS)
img.save(new_filename) img.save(new_filename)
if new_filename != filename: if new_filename != filename:
remove_old = True remove_old = True