[Chimera-users] image size

Elaine Meng meng at cgl.ucsf.edu
Fri Dec 11 08:57:52 PST 2009

Hi Bala,
It is not necessary to make the window the same pixel size as the  
image you want, only the same width:height ratio (aspect ratio).  If  
you want a square image, make the window square at whatever size is  
convenient.   Then in the File... Save Image dialog you can specify  
any pixels, or use inches with a dpi value.  The Save Image dialog has  
an option "Maintain current aspect ratio" that is turned on by  
default.  You would need to turn that off to save an image with a  
different aspect ratio than the window, but I don't recommend that  
because the window would not show what the image would contain.

This tutorial includes a section on setting image size:

I don't know why windowsize did not give the size you specified -- it  
works in my tests.  At first I thought it was because that was bigger  
than your display, but at least on my Mac it worked to make the window  
bigger than my display:  windowsize 1200 1200 did give
width 1200 and height 1200 in the save image dialog.  Since that size  
is not convenient (I can't see the command line) I then entered  
windowsize 800 800.  Next I tried image save with dimensions of  
inches, dpi 300, width 4.  The "Maintain current aspect ratio" option  
was turned on, so simply clicking in the height area sets it to 4.

The image saved that way did have the correct size (1200 x 1200  
pixels, 4" x 4") as reported by Photoshop.

If things are not working on your machine, you should use "Help...  
Report a Bug", describe what you did, attach any important files, and  
include your email address if you want a reply.  That will include  
information about your machine, since I cannot reproduce the problems  
you are describing.
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Dec 11, 2009, at 3:21 AM, Bala subramanian wrote:

> Friends,
> What is the best way to generate an image of fixed size. Say i want  
> to create an image of 4,4 (width, height) at 300dpi. I tried the  
> following
> windowsize 1200  1200
> When i go to save image--> I saw the pixel width and height changed  
> as 1200, 618 ( I dnt understand why this changes although i set as  
> 1200 1200). So i set the print unit as 'inches', then i entered  
> width and height as 4,4. The final image that it produced has  
> different width and height (4, 6.13).
> Thanks,
> Bala

More information about the Chimera-users mailing list