mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix processing of images with extreme aspect ratios in html2lrf
This commit is contained in:
parent
00b0cf46fc
commit
bce8b75095
@ -902,6 +902,10 @@ class HTMLConverter(object):
|
||||
factor = 720./self.profile.dpi
|
||||
|
||||
def scale_image(width, height):
|
||||
if width <= 0:
|
||||
width = 1
|
||||
if height <= 0:
|
||||
height = 1
|
||||
pt = PersistentTemporaryFile(suffix='_html2lrf_scaled_image_.'+encoding.lower())
|
||||
self.image_memory.append(pt) # Neccessary, trust me ;-)
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user