[EMAIL PROTECTED] wrote:

>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?
>
>  
>
No. Go ahead and try it and let me know what happens.

>I have tried your suggestion  
>'document.jmolApplet0.getProperty("jmolViewer").getScreenImage()' but  
>I didn't get any image. 
>
Not surprised -- you got an image, all right, but it's a Java Image 
object, not something that can be put into the page readily.


>But I still think base64 encoding might not be  
>necessary and without it this could even work in MSIE.
>
>  
>
I don't think it can work on MSIE. The key is the data: protocol, which 
must require encoding for image data, as the data is binary. If you get 
anything to work on MSIE, do let me know.

>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".
>
>  
>
ok. I think it's kind of neat how you can get a stereo pair with this. 
Did you see I added a "stereo" button. I may have gotten my rotations 
backward on that. I don't know.

For that matter, you could run a script to any extent, even do a pause, 
snap a picture, and then continue. (That would not work with stereo, 
though, because stereo requires running a script, which would not run if 
the current script is paused.) And, since getProperty can be scripted, 
you can even build into the script the delivery of the image at selected 
points. (I'd have to see if a "refresh" is necessary in that case:

  rotate x 30;getproperty "image";rotate y 30;getProperty "image"

for example. Very interesting. Lots of possibilities -- a page could use 
messageCallback to catch the getProperty return, then output that to an 
image on the page. Let's get a demo of this.

Now, the downside is that JmolApplet.jar is getting larger and larger. 
At what point are people going to say, "ENOUGH ALREADY!"? This image 
generation capability adds about 17KB to the Jar size. Is this an issue?


Bob


>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
>  
>

-------------------------------------------------------------------------
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

Reply via email to