fixed resize of small photo

This commit is contained in:
2022-10-08 11:58:53 +02:00
parent 6796867136
commit 7f26a447c9
4 changed files with 8 additions and 3 deletions

View File

@@ -435,9 +435,10 @@ def resize_photos(image_file):
else:
resized_height = MAX_SIZE
resized_width = int(round((MAX_SIZE/float(height_org))*width_org))
# best down-sizing filter
img_anti = img_org.resize((resized_width, resized_height), Image.ANTIALIAS)
# best down-sizing filter
img_anti = img_org.resize((resized_width, resized_height), Image.ANTIALIAS)
else:
img_anti = img_org
# create a new file name for saving the result
img_anti.save(image_file)