Skip to content

Commit

Permalink
fixed tests not working after prepare images
Browse files Browse the repository at this point in the history
  • Loading branch information
Flippchen committed Aug 7, 2023
1 parent 978fa7e commit cd6db29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/prepare_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np
from scipy.ndimage import maximum_filter
from PIL import Image, ImageOps, ImageFile, ImageFilter, ImageChops
from PIL import Image, ImageOps, ImageFile, ImageChops
from rembg import remove, new_session
from PIL.Image import Image as PILImage
from typing import Tuple
Expand Down Expand Up @@ -154,7 +154,7 @@ def resize_and_pad_image(image: PILImage, target_size: Tuple, fill_color=(0, 0,
new_height = target_size[1]

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

# Calculate padding
padding_width = target_size[0] - new_width
Expand Down

0 comments on commit cd6db29

Please sign in to comment.