forked from 0x2620/pandora
image width/height must be >0
This commit is contained in:
parent
d30c2ba78e
commit
83d57b6197
2 changed files with 4 additions and 4 deletions
|
|
@ -265,6 +265,9 @@ def resize_image(image_source, image_output, width=None, size=None):
|
|||
height = int(width / (float(source_width) / source_height))
|
||||
height = height - height % 2
|
||||
|
||||
width = min(width, 1)
|
||||
height = min(height, 1)
|
||||
|
||||
if width < source_width:
|
||||
resize_method = Image.ANTIALIAS
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue