[Erp5-report] r31524 fabien - /erp5/trunk/products/ERP5Form/ImageField.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 29 18:27:11 CET 2009


Author: fabien
Date: Tue Dec 29 18:27:10 2009
New Revision: 31524

URL: http://svn.erp5.org?rev=31524&view=rev
Log:
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.

Modified:
    erp5/trunk/products/ERP5Form/ImageField.py

Modified: erp5/trunk/products/ERP5Form/ImageField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ImageField.py?rev=31524&r1=31523&r2=31524&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ImageField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ImageField.py [utf8] Tue Dec 29 18:27:10 2009
@@ -150,6 +150,7 @@
       # 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




More information about the Erp5-report mailing list