Commit 3d5ad4e0 authored by Fabien Morin's avatar Fabien Morin

fix image size problem in render_odg

The size of the display is not the size of the image, it should be the maximum
size of the image but in all cases, the image should keep its ratio aspect.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31524 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04fa8bdc
......@@ -150,6 +150,7 @@ class ImageFieldWidget(Widget.TextWidget):
# set the size of the image
if display is not None:
height, width = image_object.getSizeFromImageDisplay(display)
width, height = image_object._getAspectRatioSize(width, height)
if draw_frame_node.attrib.get('{%s}width' % SVG_URI, {}) != {} and \
draw_frame_node.attrib.get('{%s}height' % SVG_URI, {}) != {}:
# if a size already exist from attr_dict, try to resize the image to
......
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