Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def resize_image(image, max_size=1024):
|
|
21 |
if width > max_size or height > max_size:
|
22 |
ratio = min(max_size / width, max_size / height)
|
23 |
new_size = (int(width * ratio), int(height * ratio))
|
24 |
-
image = image.resize(new_size, Image.ANTIALIAS
|
25 |
return image
|
26 |
|
27 |
def adjust_brightness_contrast(image, brightness=1.2, contrast=1.2):
|
|
|
21 |
if width > max_size or height > max_size:
|
22 |
ratio = min(max_size / width, max_size / height)
|
23 |
new_size = (int(width * ratio), int(height * ratio))
|
24 |
+
image = image.resize(new_size, Image.Resampling.LANCZOS) # Usando LANCZOS em vez de ANTIALIAS
|
25 |
return image
|
26 |
|
27 |
def adjust_brightness_contrast(image, brightness=1.2, contrast=1.2):
|