From 3d5ad4e0e7e86212d721755c42401cc51921a24f Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Tue, 29 Dec 2009 17:27:10 +0000 Subject: [PATCH] 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 --- product/ERP5Form/ImageField.py | 1 + 1 file changed, 1 insertion(+) diff --git a/product/ERP5Form/ImageField.py b/product/ERP5Form/ImageField.py index 17cb476e7c..a833f570b9 100644 --- a/product/ERP5Form/ImageField.py +++ b/product/ERP5Form/ImageField.py @@ -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 -- 2.30.9