fix: replace Image.ANTIALIAS with Image.LANCZOS in resize_image function to resolve AttributeError
This commit is contained in:
parent
47dade0384
commit
c5ec574873
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user