made resizing more accurate
This commit is contained in:
parent
72502d69e9
commit
f3a7dc9b80
|
@ -40,7 +40,7 @@ def scale_image(image, maxDim=100):
|
||||||
new_height = maxDim
|
new_height = maxDim
|
||||||
aspect_ratio = original_width/float(original_height)
|
aspect_ratio = original_width/float(original_height)
|
||||||
new_width = int(aspect_ratio * new_height)
|
new_width = int(aspect_ratio * new_height)
|
||||||
image = image.resize((new_width, new_height))
|
image = image.resize((new_width, new_height), Image.ANTIALIAS)
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user