Spaces:
Sleeping
Sleeping
Commit
•
4b0d7e0
1
Parent(s):
41d30e3
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
|
|
6 |
import io
|
7 |
import json
|
8 |
|
9 |
-
def resize_image(image_path, max_size=(
|
10 |
with Image.open(image_path) as img:
|
11 |
img.thumbnail(max_size, Image.Resampling.LANCZOS)
|
12 |
buffer = io.BytesIO()
|
|
|
6 |
import io
|
7 |
import json
|
8 |
|
9 |
+
def resize_image(image_path, max_size=(512, 512), quality=85):
|
10 |
with Image.open(image_path) as img:
|
11 |
img.thumbnail(max_size, Image.Resampling.LANCZOS)
|
12 |
buffer = io.BytesIO()
|