mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Comic Input: Fix conversion failing when output profile is set to Tablet Output
This commit is contained in:
parent
450b8f4341
commit
c384f93e4b
@ -131,6 +131,9 @@ class PageProcessor(list): # {{{
|
|||||||
newsizey = int(newsizex / aspect)
|
newsizey = int(newsizex / aspect)
|
||||||
deltax = 0
|
deltax = 0
|
||||||
deltay = (SCRHEIGHT - newsizey) / 2
|
deltay = (SCRHEIGHT - newsizey) / 2
|
||||||
|
if newsizex < 20000 and newsizey < 20000:
|
||||||
|
# Too large and resizing fails, so better
|
||||||
|
# to leave it as original size
|
||||||
wand.size = (newsizex, newsizey)
|
wand.size = (newsizex, newsizey)
|
||||||
wand.set_border_color(pw)
|
wand.set_border_color(pw)
|
||||||
wand.add_border(pw, deltax, deltay)
|
wand.add_border(pw, deltax, deltay)
|
||||||
@ -152,10 +155,14 @@ class PageProcessor(list): # {{{
|
|||||||
newsizey = int(newsizex / aspect)
|
newsizey = int(newsizex / aspect)
|
||||||
deltax = 0
|
deltax = 0
|
||||||
deltay = (wscreeny - newsizey) / 2
|
deltay = (wscreeny - newsizey) / 2
|
||||||
|
if newsizex < 20000 and newsizey < 20000:
|
||||||
|
# Too large and resizing fails, so better
|
||||||
|
# to leave it as original size
|
||||||
wand.size = (newsizex, newsizey)
|
wand.size = (newsizex, newsizey)
|
||||||
wand.set_border_color(pw)
|
wand.set_border_color(pw)
|
||||||
wand.add_border(pw, deltax, deltay)
|
wand.add_border(pw, deltax, deltay)
|
||||||
else:
|
else:
|
||||||
|
if SCRWIDTH < 20000 and SCRHEIGHT < 20000:
|
||||||
wand.size = (SCRWIDTH, SCRHEIGHT)
|
wand.size = (SCRWIDTH, SCRHEIGHT)
|
||||||
|
|
||||||
if not self.opts.dont_sharpen:
|
if not self.opts.dont_sharpen:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user