Fix resize mode typo.
This commit is contained in:
parent
982cc9c42a
commit
27f6bfaf2e
|
@ -98,7 +98,7 @@ class BotInstance:
|
|||
image = Image.open(BytesIO(image_request.content))
|
||||
|
||||
if image.width > 2048:
|
||||
image = image.resize((2048, int(image.height * (2048 / image.width))), Image.Resampling.LANCZOS)
|
||||
image = image.resize((2048, int(image.height * (2048 / image.width))), Image.LANCZOS)
|
||||
# Apply JPEG compression
|
||||
image = image.convert('RGB')
|
||||
image.save("image.jpg", optimize=True, quality=90)
|
||||
|
|
Loading…
Reference in New Issue