fix --fit=exact if one value is missing
This commit is contained in:
parent
ad528d4feb
commit
86552a78dc
1 changed files with 1 additions and 0 deletions
|
@ -750,6 +750,7 @@ def get_layout_fun(pagesize, imgsize, border, fit, auto_orient):
|
||||||
newimgheight = (newimgwidth * imgheight)/imgwidth
|
newimgheight = (newimgwidth * imgheight)/imgwidth
|
||||||
else:
|
else:
|
||||||
raise ValueError("fitwidth and fitheight cannot both be None")
|
raise ValueError("fitwidth and fitheight cannot both be None")
|
||||||
|
return newimgwidth, newimgheight
|
||||||
elif fit == FitMode.shrink:
|
elif fit == FitMode.shrink:
|
||||||
if fitwidth is not None and fitheight is not None:
|
if fitwidth is not None and fitheight is not None:
|
||||||
if imgwidth <= fitwidth and imgheight <= fitheight:
|
if imgwidth <= fitwidth and imgheight <= fitheight:
|
||||||
|
|
Loading…
Reference in a new issue