Dear Bob,

Yes, specifying pixel sizes in "write image" works brilliantly. I was unable to discern from the present documentation that this was possible. I suggest adding some version of what is below in the "write image" documentation (below "write frames"):

write width height IMAGE format compression "filename"
Width and height are optional, and are specified in pixels. Format is one of JPG, JPG64, PNG, PNGJ, PNGT, PPM (see below). Compression is a number between 0 and 10 (default 2).

The image size will default to the size of the Jmol viewport. However, you may specify width and height in pixels for the written image, thereby increasing resolution. By default, antiAliasImages will be on -- it is distinct from antiAliasDisplay which need not be turned on in order to smooth your written images.
Examples:

  write "mypic.jpg"
  write IMAGE "mypic.jpg"
  write IMAGE JPG "mypic.jpg"
  write 2048 1024 IMAGE PNG "mypic.png"
  write IMAGE PNG 1 "mypic.png"
  write 2048 1024 IMAGE PNG 3 "mypic.png"

Thanks! Eric

At 4/2/12, you wrote:
There is no need to do anything with your display. Doesn't

write image 2000 1500 xxx.jpg

do it?



On Mon, Apr 2, 2012 at 3:51 PM, Eric Martz < [email protected]> wrote:
I wanted to make large (hi-res) jpg images using Jmol 12.2.19
application. I start it with

java -Xmx1024m -jar ~/Downloads/jmol-app/jmol.jar

on OS X to give Jmol 1 gig of memory.

Here is my script:

load =7tim
select all
spacefill off
select not solvent
spacefill
color chain

reset;center {73.4425 41.286503 51.1565}; rotate z 102.41; rotate y
149.09; rotate z -65.73;

select pgh
spacefill
color cpk

set antialiasdisplay on
background white


1. My screen is 1440 x 900 pixels. Before saving the jpg, I use
Jmol's Display, Resize menu to set Jmol to 2000 x 1500 pixels.

First possible bug: Every time I do that, I get only the width reset.
So if Jmol was 1024 x 765 pixels, and I request 2000 x 1500, I get
2000 x 765. On the second try, it always works, going to the
requested 2000 x 1500. Of course I cannot see the entire image on my
screen, but that is OK.

2. I was able to "write jpg xx.jpg" for a cartoon image, and for a
wireframe image at 2000 x 1500 pixels. However, I was unable to write
the jpg at that pixel size for a spacefill image (above script). The
write completes, but the image is corrupted. This appears to me to be a bug.

I also tried it at 1500 x 1000 pixels and also got a (different)
corrupted image in the jpg file. Jmol's display flashes the corrupted
image while it is writing, then returns to the true image after
writing is completed.

At 1024 x 765 pixels, I was able to save the image without any corruption.

Thanks, Eric
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to