1
0
Fork 0
forked from josch/img2pdf

Fix bug where horizontal and vertical borders where switched when page size was also given. Thanks Erik./a.out| sox -c 1 -e unsigned-integer -r 8000 -t u8 - -d --buffer 32 Closes #30

This commit is contained in:
Johannes 'josch' Schauer 2016-05-26 08:19:34 +02:00
parent c29df64cd8
commit d78b2cbdbc

View file

@ -816,11 +816,11 @@ def get_layout_fun(pagesize, imgsize, border, fit, auto_orient):
pagewidth, pageheight = pagesize[0], pagesize[1]
newborder = border
if pagewidth is not None:
fitwidth = pagewidth-2*newborder[0]
fitwidth = pagewidth-2*newborder[1]
else:
fitwidth = None
if pageheight is not None:
fitheight = pageheight-2*newborder[1]
fitheight = pageheight-2*newborder[0]
else:
fitheight = None
if fit in [FitMode.fill, FitMode.enlarge] and \