Douglas H Mason wrote:
>
> Is there a way for me to use the Jmol applet to create a 2-D static
> image/picture of the molecule on my web page?  In some cases, we have
> users that just need to see the image and be able to print the web
> page (with the image).  Thanks.
If your users want to get the web page with the current applet view they
could just make a screenshot (or several ones, if the page size exceeds
the screen size).

If the important thing is the current applet view, you can request an
image from Jmol (JPEG format, base64 encoded) with javascript. This
image data can then be opened in a new browser window with the aid of a
simple CGI script on your server. The CGI script just makes the base64
decoding and sends back the JPEG image to the browser.

You can see an example of this in our JenaLib Jmol Viewer, e.g.:
http://www.fli-leibniz.de/cgi-bin/3d_mapping.pl?CODE=1deh

If you press the "snapshot" button in the "Graphics Window" section you
should get a new window containing a JPEG image of the current applet
window embedded in some HTML code, hopefully with any browser.

Unfortunately there seems to bee a size limitation for data send from
Jmol to Javascript, because I get a Java security error if the image
size exceeds some limit. This limits the resolution of the image to
something between 2000x2000 and 2500x2500 pixels.

There is also another solution that shows the image directly in the
browser. But it doesn't work with Internet Explorer.

Regards,
Rolf


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to