merged from 32: only scale images down, not up

svn: r14958
This commit is contained in:
Stéphane Charette 2010-03-28 14:48:23 +00:00
parent efaec2271c
commit 876f0ac1d3

View File

@ -2676,7 +2676,7 @@ class MediaPage(BasePage):
# a max of zero is ignored # a max of zero is ignored
scale_h = (float(max_height)/height) or 1 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_width = int(width*scale)
new_height = int(height*scale) new_height = int(height*scale)
if scale < 0.8: if scale < 0.8: