Angel, I thought that Chris might have dynamic Jmol image insertion into a Web Page in mind. Jaime, this is not quite the same as preloading images in JavaScript.
I do this with Jmol jpeg's because they are already in text (base64) format. Base64 images are easily reduced in size if needed, and they can be inserted as simple text images using standard JavaScript or JQuery approaches. Jmol jpeg's are fine for this, and I think that's the way to go. Still, I was curious about bringing the binary array into JavaScript and working with it. So, by the numbers: 1) Using my own Jmol function that grabs the binary array, I can use Jmol.evaluateVar to put AN array into a JavaScript variable. 2) This array has the correct keys. (*See issue below.) 3) When I extract _DATA_ from this array on the JavaScript side, I get a long array on numbers. I'm assuming these are character codes. 4) I don't see this as a usable approach for inserting images dynamically, but it was interesting. As a mentioned above, I think Jmol Jpeg is the route to go for dynamic image insertion. * Bob, I'm not seeing the _IMAGE_ key on the Jmol or JavaScript side. On both sides I can work with the _DATA_ key, but the _IMAGE_ key does not seem to be there. Otis -- Otis Rothenberger o...@chemagic.org http://chemagic.org > On Jul 15, 2016, at 4:51 AM, Angel Herráez <angel.herr...@uah.es> wrote: > > El 14 Jul 2016 a las 12:13, Robert Hanson escribió: >> Note that by putting a PNGJ file into a variable you can >> >> -- extract or exchange the image > > So a question would be, > How to apply that extracted image in the page, e.g. as the source of an > <img> tag created dynamically in Javascript? > > > > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users