habulaj commited on
Commit
3a7882a
·
verified ·
1 Parent(s): 1aab113

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):