Re: [Jmol-users] png files created in jsmol
Hi João Even though the PNG files are not validated by pngcheck, they are rendered correctly by many programs. It should be easy to implement the setting of 'set imageState off' in the page source for the Sage project, and then the product of the Export menu would be compliant. --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] png files created in jsmol
Às 09:24 de 22-07-2017, Rolf Huehne escreveu: Am 22.07.17 um 10:04 schrieb João Palhoto Matos: Hello! I use jmol inside SageMath which I build from source. Currently this is Sage 7.6 which comes with jmol-14.6.1_2016.07.11 from which it uses jsmol. When producing a 3d graphic one has the option of saving or exporting files in various formats from a context menu. One of them is PNG files, namely "export PNG image". The files produced in this manner fail to pass testing with the pngcheck utility. Opening the file with gimp and exporting to png format one ends up with a smaller file without apparent image quality loss which is considered OK by pngcheck. Is this intended behavior and the file getting some extra information, or some bug? It is a special Jmol feature. As default, images saved in PNG format are actually saved in PNGJ format (see https://chemapps.stolaf.edu/jmol/docs/#writeimagesandframes). This means everything needed to get back the 3D model in the representation shown in the image is included. You can easily check this by opening the image in Jmol/JSmol. This behaviour can be switched off by the command 'set imageState off' and back on by 'set imageState on'. Regards, Rolf Thanks! This seems rather counterintuitive for a menu labeled "Export...", though. I'll notify sage developers about this. Regards, João -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] JSModel demo control problem
David, this is great fun! Please check out http://biomodel.uah.es/JSmol/responsive-size-1.htm Height of JSmol will always match height (I didn't think this was easy or even possible, but it's amazingly simple code) The key for versatility is to always set width and height to 100% in Info. Then use an outer container + css and js to control the size. And then these css units that I discovered recently and once again do the magic: "vw" "vh", meaning percent fraction of the window width or height. The big difference against classic % is you can use vw for the height! So the result here is a set size of 400px for JSmol, as long as it fits within the screen width. If not, 90% of it. And always square. I believe this will be great for the phones. David Leader wrote: > The problem with the width/height thing is that one can´t do a shrinkwrap like one can with an image and do a width:100%, height: auto. > My problem is that 280 px is actually just too large for the iPhone, so I > have to hack that a bit, and in truth it's too small for modern large displays --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] png files created in jsmol
Am 22.07.17 um 10:04 schrieb João Palhoto Matos: Hello! I use jmol inside SageMath which I build from source. Currently this is Sage 7.6 which comes with jmol-14.6.1_2016.07.11 from which it uses jsmol. When producing a 3d graphic one has the option of saving or exporting files in various formats from a context menu. One of them is PNG files, namely "export PNG image". The files produced in this manner fail to pass testing with the pngcheck utility. Opening the file with gimp and exporting to png format one ends up with a smaller file without apparent image quality loss which is considered OK by pngcheck. Is this intended behavior and the file getting some extra information, or some bug? It is a special Jmol feature. As default, images saved in PNG format are actually saved in PNGJ format (see https://chemapps.stolaf.edu/jmol/docs/#writeimagesandframes). This means everything needed to get back the 3D model in the representation shown in the image is included. You can easily check this by opening the image in Jmol/JSmol. This behaviour can be switched off by the command 'set imageState off' and back on by 'set imageState on'. Regards, Rolf -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] png files created in jsmol
Hello! I use jmol inside SageMath which I build from source. Currently this is Sage 7.6 which comes with jmol-14.6.1_2016.07.11 from which it uses jsmol. When producing a 3d graphic one has the option of saving or exporting files in various formats from a context menu. One of them is PNG files, namely "export PNG image". The files produced in this manner fail to pass testing with the pngcheck utility. Opening the file with gimp and exporting to png format one ends up with a smaller file without apparent image quality loss which is considered OK by pngcheck. Is this intended behavior and the file getting some extra information, or some bug? Typical output of pngcheck in one of these files: pngcheck Fromjmol.png Fromjmol.png additional data after IEND chunk ERROR: Fromjmol.png The file in question is available at: https://drive.google.com/file/d/0BxvQu5VZ1xbeODl6R01aMVJSeFE/view?usp=sharing I believe jmol is not particularly changed by sage and this probably the best place to ask the question. Sorry, if this not the case. Best, and thanks for Jmol, João Palhoto Matos -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users