Spaces:
Running
Running
updated pil antialias
Browse files
utils.py
CHANGED
@@ -6,7 +6,7 @@ import base64
|
|
6 |
# Convert Image to Base64
|
7 |
def im_2_b64(image):
|
8 |
image = Image.open(image)
|
9 |
-
image.thumbnail((512, 512), Image.
|
10 |
image = image.convert("RGB")
|
11 |
buff = BytesIO()
|
12 |
image.save(buff, format="JPEG")
|
|
|
6 |
# Convert Image to Base64
|
7 |
def im_2_b64(image):
|
8 |
image = Image.open(image)
|
9 |
+
image.thumbnail((512, 512), Image.Resampling.LANCZOS)
|
10 |
image = image.convert("RGB")
|
11 |
buff = BytesIO()
|
12 |
image.save(buff, format="JPEG")
|