Commit
·
e86dcb9
1
Parent(s):
0ed5aeb
Update app.py
Browse files
app.py
CHANGED
|
@@ -241,7 +241,7 @@ def resize_image(image, output_size=(1024, 576)):
|
|
| 241 |
# Resize the image to match the target height, maintaining aspect ratio
|
| 242 |
new_height = output_size[1]
|
| 243 |
new_width = int(new_height * image_aspect)
|
| 244 |
-
resized_image = image.resize((new_width, new_height), Image.
|
| 245 |
# Calculate coordinates for cropping
|
| 246 |
left = (new_width - output_size[0]) / 2
|
| 247 |
top = 0
|
|
|
|
| 241 |
# Resize the image to match the target height, maintaining aspect ratio
|
| 242 |
new_height = output_size[1]
|
| 243 |
new_width = int(new_height * image_aspect)
|
| 244 |
+
resized_image = image.resize((new_width, new_height), Image.Resampling.LANCZOS)
|
| 245 |
# Calculate coordinates for cropping
|
| 246 |
left = (new_width - output_size[0]) / 2
|
| 247 |
top = 0
|