Quoting Bob Hanson <[EMAIL PROTECTED]>:
> I have added a proof of concept for image creation from the Jmol applet at
>
> http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/new.htm
>
> It's the same page I've been using, but there is a new link just under
> the applet that you can click to get the image.
>
> Note that this all depends upon the user not using Internet Explorer or
> possibly some other configurations that do not support the data: URI
> <http://en.wikipedia.org/wiki/Data:_URL>
>
> This modification of Jmol has not been checked in and may not appear in
> versions of Jmol. I don't think copyright is any issue -- the license is
> very generous -- but the lack of MSIE support concerns me. To date we've
> been able to keep this pretty much platform independent.
>
> So it has its drawbacks. Right now I am not checking for browsers. I
> think the primary use would be for developers and web site designers who
> want to get images directly off their site and who can choose their browser.
>
> How it works:
>
> 1) I added
>
> getProperty image
>
> which, in terms of JavaScript is carried out as
>
> var image = jmolGetPropertyAsString("image")
>
> Now, this returns a base64-encoded jpeg image. What can we do with that?
>
Q: Have you tried it also without base64 encoding?
I have tried your suggestion
'document.jmolApplet0.getProperty("jmolViewer").getScreenImage()' but
I didn't get any image. But I still think base64 encoding might not be
necessary and without it this could even work in MSIE.
You should change "image/jpg" in your "getimage.htm" to "image/jpeg".
I forgot to mention this change in my demo page. Craig Martin reported
trouble with safari on a Mac (accidentally only off-list) and it
turned out, that safari only understands "image/jpeg" and not
"image/jpg".
Regards,
Rolf
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users