or
or
of
W x
H pixels
or
times larger than this applet
Exporting from Jmol applet an image of the current view (v. 1.5)
See version 2 of this method, which is compatible with the new Jmol-JSO and non-Java alternatives to the applet.
This is method (A), creating the image in a pop-up window. If you prefer method (B), inserting the image into the same web page, see Steven Spilatro's page.
Cross-browser
Windows XP: Firefox 2.0+, Opera 9.24+, Internet Explorer 5.5 to 8, Safari 5, Chrome
Mac OSX
10.5 Leopard: Firefox 2.0.0.11, Safari (feb08)
10.5.2: Firefox, Safari, Camino
OpenSuSE 10.2: Firefox 2.0.0.10, Opera 9.25 - fails in Konqueror 3.5.5?
Test results in other browsers and operating systems are welcome; please report to angel.herraez[at]uah.es
If it does not work in your browser, please report so that we can improve this mechanism; provide browser name, version nr., and the result of javascript:navigator.userAgent
On-line / Off-line
No access to server configuration is needed (i.e., no need to install server-side scripts).
If the browser is MS Internet Explorer below version 8, it needs online access to a PHP-enabled server that will return the image using a php page which is part of this package.
If the browser is another, inline base64-encoded images will be used first (understood by Firefox, Opera and Internet Explorer 8, at least). This method works both online and off-line (e.g., from hard disk, USB disk or CDROM).
Reusable image
The image may be copied to clipboard using the browser's pop-up menu on it. Some browsers also allow to save the image to disk, from the same pop-up menu.
Copies applet size
The size of the applet is automatically used for the image (tested from 50 to 1000 pixels, may be more depending on Java memory). The applet may be square or rectangular, and may be sized in pixels or percent. The image is opened in a new window, that fits the image size.
License
This work has been authored by Angel Herráez, from Universidad de Alcalá in Spain. Some ideas came from "Base64 encoded images for Internet Explorer", by Dean Edwards, others from generic web searching and, over all, much head scratching and testing. Version 3 of base64.php is the result of a modification by Steven Spilatro, from Marietta College in the USA, and is shared between this page and Steven's.
I have put the resulting code under Creative Commons License, so that others can
use it for free,
modifiy it to suit their needs as long as it is kept under the same licence terms,
not make any money out of it.
Any other use must have the previous approval of the author.
Download
This zip file contains the essential files (jmol_snapshot.htm, jmol_snapshot.js and base64_3.php) together with a simple opening page, a test model (butane.pdb) and images for the photo icon. If does not contain the essential JmolApplet files and Jmol.js, which you should provide from Jmol distribution.