From c5ec574873f10c5ce8605f27173e72dbc1423902 Mon Sep 17 00:00:00 2001 From: "Manuel Weiser (aider)" Date: Tue, 3 Sep 2024 14:55:24 +0200 Subject: [PATCH] fix: replace Image.ANTIALIAS with Image.LANCZOS in resize_image function to resolve AttributeError --- game_collection/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_collection/app.py b/game_collection/app.py index 0b1d70f..04eacf5 100644 --- a/game_collection/app.py +++ b/game_collection/app.py @@ -31,7 +31,7 @@ def resize_image(image_path, max_height=50): aspect_ratio = img.width / img.height new_height = min(max_height, img.height) new_width = int(aspect_ratio * new_height) - img = img.resize((new_width, new_height), Image.ANTIALIAS) + img = img.resize((new_width, new_height), Image.LANCZOS) img.save(image_path) @app.route('/games', methods=['POST'])