building sized images with MolConverter maintaining aspect

User fa1369adab

07-06-2006 18:42:30

I would like to use MolConverter to build images (jpeg or png) that are no larger than 250 pixels in their greatest dimension, with no distortion such as squeezing width without squeezing height. I can't simply use scale, because I don't know how big the resulting image will be. I can't use w or h, because the result will be square (if I give only w) or misproportioned (if I specify both without knowing the actual aspect).





Perhaps new options maxh and maxw (which I would set to 250) in association with scale would work. The scale determines the initial size. If it exceeds either maxh or maxy, the scale is implicitly reduced until both are satisfied.





Refoyl

User f359e526a1

09-06-2006 07:43:39

Hello, sorry due to the UGM we are a bit late with answering but will address this issue soon.

ChemAxon 7c2d26e5cf

12-06-2006 15:23:42

We will consider your request.


By the way, you can do it without any new image export option. Please see the following topic about it.


http://www.chemaxon.com/forum/ftopic325.html&highlight=molimagesize


Is it a suitable solution for you?

User fa1369adab

13-06-2006 14:38:26

Tamas,





Thanks. getImageSize() does just what I want in a more general way, because it lets me rescale based on either height or width or both.





Refoyl