Update html_generator.py (#2954)

With version 10.0.0 of Pillow the constant Image.ANTIALIAS has been removed. Instead Image.LANCZOS should be used.
This commit is contained in:
Turamarth14 2023-07-02 06:43:58 +02:00 committed by GitHub
parent 3c076c3c80
commit 847f70b694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ def generate_4chan_html(f):
def make_thumbnail(image):
image = image.resize((350, round(image.size[1] / image.size[0] * 350)), Image.Resampling.LANCZOS)
if image.size[1] > 470:
image = ImageOps.fit(image, (350, 470), Image.ANTIALIAS)
image = ImageOps.fit(image, (350, 470), Image.LANCZOS)
return image