Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def resize_image_pil(image, new_width, new_height):
|
|
| 24 |
width, height = img.size
|
| 25 |
|
| 26 |
width_scale = new_width/width
|
| 27 |
-
height_scale
|
| 28 |
scale = min(width_scale, height_scale)
|
| 29 |
resized = img.resize((int(width*Scale), int(height*Scale)), Image.NEAREST)
|
| 30 |
resized = resized.crop((0,0,new_width, new_height))
|
|
|
|
| 24 |
width, height = img.size
|
| 25 |
|
| 26 |
width_scale = new_width/width
|
| 27 |
+
height_scale = new_height/height
|
| 28 |
scale = min(width_scale, height_scale)
|
| 29 |
resized = img.resize((int(width*Scale), int(height*Scale)), Image.NEAREST)
|
| 30 |
resized = resized.crop((0,0,new_width, new_height))
|