wallpaper: use Image.Resampling.LANCZOS

This commit is contained in:
Vincent Bernat 2022-07-19 23:47:46 +02:00
parent 54d5d473af
commit 14f933d7e7

View file

@ -259,7 +259,7 @@ def build(background: Image, wallpaper_parts: list[WallpaperPart]) -> None:
if imy < rectangle.height:
imx, imy = image.width * rectangle.height // image.height, rectangle.height
if image.size != (imx, imy):
image = image.resize((imx, imy), Image.LANCZOS)
image = image.resize((imx, imy), Image.Resampling.LANCZOS)
image = image.crop(
(
(imx - rectangle.width) / 2,