Hi Guillaume,
It sounds like you figured out most of what you need to know to make reproducible images. Here is a summary of some of the tricky parts.
1) The ChimeraX save command uses the current graphics window dimensions if you don't specify width or height options.
2) The saved image will typically be larger in pixels than reported by the ChimeraX windowsize command on a 4K display. On a Mac with retina display it will be 2x larger in pixels, and on Windows computer if the window system is set to 150% display scaling
then the saved image will be 1.5 times larger than reported by windowsize. The reason for this is because the image is being saved using the exact number of pixels used on the screen, while the windowsize command and other windowing system tools all report
sizes in "logical pixels" (e.g. half the actual pixels on Mac, and 1/1.5 the actual pixels on a 150% scaled display on Windows).
3) Silhouette edge thickness is in actual pixels. The default setting depends on the display and equals one "logical pixel" as specified by the windowing system. So on Mac with retina display the silhouette edges are 2 pixels thick, on Windows with 4K display
and 150% display scaling the silhouettes are 1.5 pixels. You can view or set the silhouette edges with the ChimeraX command "graphics silhouettes". If you save an image with small width and height then the silhouettes will look blocky.
4) If you specify a width and height in the save image command (e.g. save myimage.png width 1000 height 1000), the width and height are in actual pixels (not logical pixels). On a high resolution display where you have used "windowsize 1000 1000" the saved
image will be of worse quality than on the actual display which is using more than 1000 by 1000 pixels (either 2000x2000 on Mac, 1500x1500 on a 150% display scaling Windows system).
5) If you specify width and height in the save image command, you should probably make sure the graphics window has the same aspect ratio. Otherwise some padding will be added if the aspect ratios don't match.
6) If you have ChimeraX maximized on Mac and then use the windowsize command it doesn't unmaximize it and I observe the ChimeraX user interface shrink to the upper right corner while the rest of the full screen is black. On Windows with maximized ChimeraX
the window shrinks to the requested graphics size. So it seems to work as expected with a maximized window, but that is probably operating system dependent.
In summary, there is some weirdness with saved image sizes because mondern window systems on high resolution displays distinguish logical pixels and actual pixels. ChimeraX uses actual pixels when copying what is on the screen so you get the same appearance
as on screen if no width/height is specified.
Tom
> On Feb 23, 2026, at 12:40 PM, Guillaume Gaullier via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Hello chimerax-users,
>
> I generated images using a command script, which is mostly reproducible
> on the same computer (so long as I don't change the size of the 3D
> window between runs). However, when running the script with the same map
> and model files but on a different computer, I get slightly different
> images: different dimensions, different aspect ratio.
>
> I assemble these images in multi-panel figures in Inkscape, with linked
> images so the panels automatically update when I regenerate the images
> from ChimeraX: this is very helpful to quickly iterate changes in
> display style, colors etc. and see how they look in the multi-panel
> figure. So I need reproducibility because, if the new images have
> different dimensions, the objects of interest in these images will move
> relative to the annotations around them in the multi-panel figure. Even
> worse, when the aspect ratio of the new image is different, Inkscape
> forces it into the aspect ratio of the original image that was inserted
> into the multi-panel figure, so the new image is squished or stretched
> in one direction.
>
> Obvious solution: do it all on the same computer. In this specific case
> I could do that (and probably will), but what if the first computer was
> no longer functioning? I'd like to have a solution if this ever happens,
> and preferably one that doesn't require me to manually fix every single
> one of the now misplaced vector elements (this almost amounts to making
> the multi-panel figure from scratch again).
>
> I tried two different things to fix this, hoping to get two different
> computers to produce identical images (same number of pixels in width
> and height, same centering of the scene), but none seemed to produce
> completely reproducible results:
>
> 1) I ran the "windowsize" command on computer A with the ChimeraX window
> as I would have it to generate the images (in this case, maximized).
> Then I wrote this command in the script with the values obtained on
> computer A, and ran this script on computer B. The image generated on
> computer B now has the same aspect ratio than the one generated on
> computer A, but still has different dimensions. I guess this is because
> the two screens have different pixel densities? This trick also only
> worked with the ChimeraX window not maximized on computer B, which could
> be because its screen has more pixels so needs less "screen space" to
> make the equivalent image size (in pixels) as the one from computer A.
>
> 2) In addition to the "windowsize" command, I specified image width and
> height explicitly in my save command, setting them the same as the
> dimensions of the image generated on computer A. This is getting closer:
> the image from computer B now has the same aspect ratio and same
> dimensions as the image from computer A. But the outlines of "graphics
> silhouettes true" appear thicker in the new image than in the original.
>
> Is there a fully reproducible way to generate images on different
> computers with different displays?
>
> Thank you,
>
> Guillaume
>
>
>
>
>
>
>
>
> När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här:
https://urldefense.com/v3/__http://www.uu.se/om-uu/dataskydd-personuppgifter/__;!!G92We9drHetJ8EofZw!b0B7R_aKUHexEyrPlRJsb4LIv2ZIJe3wkbC1O96SPjRh7qRDddVgdJn7WRrlsvxXbGG5smHaVBeYHgYmi0CWGkE-KyoC2RIV$
>
> E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here:
https://urldefense.com/v3/__http://www.uu.se/en/about-uu/data-protection-policy__;!!G92We9drHetJ8EofZw!b0B7R_aKUHexEyrPlRJsb4LIv2ZIJe3wkbC1O96SPjRh7qRDddVgdJn7WRrlsvxXbGG5smHaVBeYHgYmi0CWGkE-KxssFXux$
>
> _______________________________________________
> ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
> Archives:
https://urldefense.com/v3/__https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/__;!!G92We9drHetJ8EofZw!b0B7R_aKUHexEyrPlRJsb4LIv2ZIJe3wkbC1O96SPjRh7qRDddVgdJn7WRrlsvxXbGG5smHaVBeYHgYmi0CWGkE-K8SdSzjo$
>
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives:
https://urldefense.com/v3/__https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/__;!!G92We9drHetJ8EofZw!b0B7R_aKUHexEyrPlRJsb4LIv2ZIJe3wkbC1O96SPjRh7qRDddVgdJn7WRrlsvxXbGG5smHaVBeYHgYmi0CWGkE-K8SdSzjo$