mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-29 10:12:34 -04:00
Fix #935234 (Resize image can choose zero size for small values)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user