Skip to content

Commit

Permalink
fix: fix bug in image.thumbnail call (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 authored Dec 20, 2024
1 parent 7c47866 commit 1566464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion open_prices/proofs/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def extract_from_price_tags(images: Image.Image) -> Labels:
max_size = 1024
for image in images:
if image.width > max_size or image.height > max_size:
resized_image = image.copy().thumbnail((max_size, max_size))
resized_image = image.copy()
resized_image.thumbnail((max_size, max_size))
resized_images.append(resized_image)
else:
resized_images.append(image)
Expand Down

0 comments on commit 1566464

Please sign in to comment.