mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-04 03:44:41 +02:00
Fix processing of images with extreme aspect ratios in html2lrf
This commit is contained in:
parent
00b0cf46fc
commit
bce8b75095
1 changed files with 4 additions and 0 deletions
|
|
@ -902,6 +902,10 @@ def detect_encoding(im):
|
|||
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…
Reference in a new issue