multimodalart HF staff commited on
Commit
c29cb26
β€’
1 Parent(s): e86dcb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -251,7 +251,7 @@ def resize_image(image, output_size=(1024, 576)):
251
  # Resize the image to match the target width, maintaining aspect ratio
252
  new_width = output_size[0]
253
  new_height = int(new_width / image_aspect)
254
- resized_image = image.resize((new_width, new_height), Image.ANTIALIAS)
255
  # Calculate coordinates for cropping
256
  left = 0
257
  top = (new_height - output_size[1]) / 2
 
251
  # Resize the image to match the target width, maintaining aspect ratio
252
  new_width = output_size[0]
253
  new_height = int(new_width / image_aspect)
254
+ resized_image = image.resize((new_width, new_height), Image.Resampling.LANCZOS)
255
  # Calculate coordinates for cropping
256
  left = 0
257
  top = (new_height - output_size[1]) / 2