Odt report: display images with real proportions

Hi everyone,
i have a problem in an odt report.
I need to view an image that is sent dynamically by Tryton. The images sent by Tryton can have different sizes (width x height).
In the odt file I inserted a frame but I cannot change its size dynamically (the images do not have the real proportions). Is there a way to be able to view the images with the correct proportions (width x height real)?

Thanks

The third and forth optional arguments of image: expression, in the frame name, set the width and height of the frame.

Thanks ced,
in this way, however, I can set the size of the frame statically.

Is there a way to dynamically obtain the width and height of the image sent by tryton (the frame size varies dynamically according to the image sent by tryton)?

I would say that it is not the job of the renderer (relatorio). You should set with the image data, the size of it. There are python libraries that can guess or read such size.

You could use PIL, create a PIL Image from tryton image and then call Image.size() to get the image size in pixels.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.