fixup! chore(python): bump required Pillow, stop using deprecated symbol

pull/3686/merge^2
matejcik 2 months ago
parent e739edb51e
commit a273a03b15

@ -99,7 +99,7 @@ def image_to_toif(filename: Path, width: int, height: int, greyscale: bool) -> b
f"Image is not {width}x{height}, but {image.size[0]}x{image.size[1]}. Do you want to resize it automatically?",
default=True,
):
image = image.resize((width, height), Image.ANTIALIAS)
image = image.resize((width, height), Image.Resampling.LANCZOS)
else:
raise click.ClickException(
f"Wrong size of image - should be {width}x{height}"
@ -137,7 +137,7 @@ def image_to_jpeg(filename: Path, width: int, height: int) -> bytes:
f"Image is not {width}x{height}, but {image.size[0]}x{image.size[1]}. Do you want to resize it automatically?",
default=True,
):
image = image.resize((width, height), Image.ANTIALIAS)
image = image.resize((width, height), Image.Resampling.LANCZOS)
else:
raise click.ClickException(
f"Wrong size of image - should be {width}x{height}"

Loading…
Cancel
Save