mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #935234 (Resize image can choose zero size for small values)
This commit is contained in:
parent
228a619c18
commit
6e2fb2f1e6
@ -48,6 +48,8 @@ class RescaleImages(object):
|
||||
scaled, new_width, new_height = fit_image(width, height,
|
||||
page_width, page_height)
|
||||
if scaled:
|
||||
new_width = max(1, new_width)
|
||||
new_height = max(1, new_height)
|
||||
self.log('Rescaling image from %dx%d to %dx%d'%(
|
||||
width, height, new_width, new_height), item.href)
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user