tmoerman / sourire

A minimal web API rendering SMILES molecules
Eclipse Public License 1.0
19 stars 1 forks source link

Image size parameter #1

Closed herkulano closed 9 years ago

herkulano commented 9 years ago

It would be nice to have a parameter to set the height or width of the image or both. In case of both it would resize the image according to the lowest value.

tmoerman commented 9 years ago

Hi Herc, this is possible.

For example:

http://localhost:8000/molecule/CN1CCC%5BC%40H%5D1c2cccnc2?render-image-width=400&render-image-height=200

or

http://localhost:8000/molecule/CN1CCC%5BC%40H%5D1c2cccnc2?render-image-size=400,200

What Sourire does is simply relay the url parameters to the underlying Indigo renderer. Possible parameters are described here: http://scitouch.net/up/indigo-doc/indigo/options/index.html

Actually I should put this in the readme...

Hope this is useful. T

herkulano commented 9 years ago

that's great! thank you.