From 86552a78dc1bc5a350619f20710f18e9203a1681 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 17 Feb 2016 18:11:11 +0100 Subject: [PATCH] fix --fit=exact if one value is missing --- src/img2pdf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/img2pdf.py b/src/img2pdf.py index c71bcb2..8c9ef67 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -750,6 +750,7 @@ def get_layout_fun(pagesize, imgsize, border, fit, auto_orient): newimgheight = (newimgwidth * imgheight)/imgwidth else: raise ValueError("fitwidth and fitheight cannot both be None") + return newimgwidth, newimgheight elif fit == FitMode.shrink: if fitwidth is not None and fitheight is not None: if imgwidth <= fitwidth and imgheight <= fitheight: