Commit a7422d81 authored by 's avatar

merged fix for bug # 1990 from 2.3 branch

parent be1dbcf8
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Image object""" """Image object"""
__version__='$Revision: 1.125 $'[11:-2] __version__='$Revision: 1.126 $'[11:-2]
import Globals, string, struct, content_types import Globals, string, struct, content_types
from OFS.content_types import guess_content_type from OFS.content_types import guess_content_type
...@@ -602,9 +602,9 @@ class Image(File): ...@@ -602,9 +602,9 @@ class Image(File):
ydelta = yscale or scale ydelta = yscale or scale
if xdelta and width: if xdelta and width:
width = str(int(width) * xdelta) width = str(int(round(int(width) * xdelta)))
if ydelta and height: if ydelta and height:
height = str(int(height) * ydelta) height = str(int(round(int(height) * ydelta)))
result='<img src="%s"' % (self.absolute_url()) result='<img src="%s"' % (self.absolute_url())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment