Skip to content

Commit cd6db29

Browse files
committed
fixed tests not working after prepare images
1 parent 978fa7e commit cd6db29

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utilities/prepare_images.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import numpy as np
55
from scipy.ndimage import maximum_filter
6-
from PIL import Image, ImageOps, ImageFile, ImageFilter, ImageChops
6+
from PIL import Image, ImageOps, ImageFile, ImageChops
77
from rembg import remove, new_session
88
from PIL.Image import Image as PILImage
99
from typing import Tuple
@@ -154,7 +154,7 @@ def resize_and_pad_image(image: PILImage, target_size: Tuple, fill_color=(0, 0,
154154
new_height = target_size[1]
155155

156156
# Resize the image while maintaining its aspect ratio
157-
resized_image = image.resize((new_width, new_height), Image.ANTIALIAS)
157+
resized_image = image.resize((new_width, new_height), Image.Resampling.LANCZOS)
158158

159159
# Calculate padding
160160
padding_width = target_size[0] - new_width

0 commit comments

Comments
 (0)