Very nice. On a Mac (10.8.3) with Safari (6.0.2) the generated image is 
automatically opened in Preview and when dropped onto Jmol.jar reveals the true 
Jmol content.
Firefox, Chrome and Opera work too prompting to open the new file.

The resolution of the image is presumably based on the size of the JSmol 
window, which is small in Bob's demonstration page, and so the final resolution 
is low. I've used similar image generation methods from very large applets in 
the past to create higher quality graphics.

Is there a way of changing the dimensions of the JSmol applet on the fly or by 
getting it to track the size of the window? As in 
http://chemapps.stolaf.edu/jmol/docs/examples-12/new.htm - new resizable window?
Best regards
Nick
--
Nick Greeves                            via OS X Mail
Director of Teaching and Learning
Department of Chemistry
University of Liverpool
Donnan and Robert Robinson Laboratories
Crown Street, LIVERPOOL L69 7ZD U.K.
Email address:    [email protected]<mailto:[email protected]>
WWW Pages:    http://www.chemtube3d.com
Tel:            +44 (0)151-794-3506 (3500 secretary)
Dept Fax:   +44 (0)151-794-3588








On 17 Mar 2013, at 00:22, 
[email protected]<mailto:[email protected]>
 wrote:

Date: Sat, 16 Mar 2013 16:06:07 -0500
From: Robert Hanson <[email protected]<mailto:[email protected]>>
Subject: [Jmol-users] WRITE working
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Message-ID:
<caf_yuvu1upuqarek0w3_b4+5ezvzanpqdsueyewq0t-wmyk...@mail.gmail.com<mailto:caf_yuvu1upuqarek0w3_b4+5ezvzanpqdsueyewq0t-wmyk...@mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"

Note the new link "image" under the applet at
http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm

The PNG image is constructed in JavaScript, encoded as BASE64, and sent to
the server for decoding and sending back as a PNG file. In this case, it's
a PNGJ file, so it serves both as an image and a ZIP file containing the
relevant files. (At least, 7Zip opens it as a ZIP file and MSPaint opens it
as an image). I think you can also use other methods with HTML5 to capture
the image from a canvas, but I'm not sure that works with all browsers.

--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to