fixed resize of small photo
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user