Bob Hanson wrote:
>[EMAIL PROTECTED] wrote:
>>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.
>
>  
I should have followed the wikipedia link on the "data: URI scheme"
before writing my mail. From the document at the W3C server that I had
read it looked like a more general scheme. But the wikipedia entry
states that it is restricted to base64 encoding and that there are size
limitations.

The size problem seems to be quite another drawback. I tested the latest
applet version with my interface and different applet sizes and on WinXP
with Java 1.5 I got sometimes even with a 600x600 image (or at least
with 1600x1600) the following error message:

uncaught exception: java.security.PrivilegedActionException: 
java.security.PrivilegedActionException: 
java.lang.reflect.InvocationTargetException

On SuSE 9.3 with Java 1.4.2_11 and Firefox 1.5.0.7 there was no problem
to view and save a snapshot even with the maximum applet size
(2000x2000, as far as I know), But Konqueror 3.4.0 seems to be as
restrictive as the browsers on WinXP.

You can test this yourself with the following URL:
"http://www.fli-leibniz.de/cgi-bin/3d_mapping-snapshot_demo.pl?CODE=2arc&JMOLVERSION=11beta&SIZE=600";

Above the script input line (in the 'Miscellaneous' section) there is a
"snapshot" button. If you press it there should appear a snapshot of the
current Jmol view below the applet.

The size can be changed by replacing the number in "SIZE=600" in the URL
(e.g.: SIZE=1600 or SIZE=1200x800).
Any PDB code can be selected by replacing the PDB code in "CODE=2arc" in
the URL (e.g.: CODE=1deh).

(Note: The log window in the viewer doesn't work with the latest applet
because I have to adapt the viewer and/or the new Jmol.js for it.)

So it looks as if the server based solution cannot be totally avoided,
at least for MSIE. Especially because I think that the 'snapshot'
function would be very useful for images exceeding the screen size.
Therefore I wrote a little CGI script that bounces back what is send to
it and installed it (temporarily) on our server. A little Demo is
available at the following URL:
"http://www.fli-leibniz.de/ImgLibPDB/pages/bounce_demo.html";

How does it work?
A "POST " request is send to the server
(http:www.fli-leibniz.de/cgi-bin/bounce.cgi) with the following parameters:

  MIME="image/jpeg"    (could be any other MIME type)
  CODING="base64"      (or "none" if it is not base64 encoded)
  DATA="..."     (the "..." represent the image data)

If you press the "Bounce JPEG Image" button there should open another
window with a small Jmol logo.
The data size is currently limited to 4MB.

If Jmol would be able to send a "POST" request and the result would be
returned to the browser this should theoretically work even with MSIE.


<snip>
>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.
>  
Yes, it looks weird if it is supposed to be wall-eyed stereo.

<snip>
>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?
>
>
>  
I hope that there are not many users with a low bandwidth internet
connection that use (or would like to use) our Jmol viewer.
They would already have to wait several minutes for the applet with all
versions listed below and I would think that the recent additions are
really worth waiting a bit longer.

jmol-10.00.33/JmolApplet.jar      698010
jmol-10.00.36/JmolApplet.jar      685498
jmol-10.00.47/JmolApplet.jar      780786
jmol-10.00.48/JmolApplet.jar      788024
jmol-10.00.49/JmolApplet.jar      853475
jmol-10.00.49p/JmolApplet.jar     804436
jmol-10.00.50/JmolApplet.jar      792625
jmol-10.00.51/JmolApplet.jar      793787
jmol-10.00.60/JmolApplet.jar      813270
jmol-10.9.65/JmolApplet.jar       1032705
jmol-10.9.66/JmolApplet.jar       1034234
jmol-10.9.67/JmolApplet.jar       1037503
jmol-10.2.0/JmolApplet.jar        819822
jmol-10.3.1p/JmolApplet.jar       755637
jmol-10.x.46d/JmolApplet.jar      887663
jmol-11beta/JmolApplet.jar        994527

Regards,
Rolf

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