only scale images down, not up

svn: r14956
This commit is contained in:
Stéphane Charette 2010-03-28 14:10:17 +00:00
parent 3f1d184f9b
commit e0503bf667

View File

@ -2676,7 +2676,7 @@ class MediaPage(BasePage):
# a max of zero is ignored
scale_h = (float(max_height)/height) or 1
scale = min(scale_w, scale_h)
scale = min(scale_w, scale_h, 1.0)
new_width = int(width*scale)
new_height = int(height*scale)
if scale < 0.8: