[chimerax-users] Image saving/exporting options
Tom Goddard
goddard at sonic.net
Wed Feb 15 10:21:44 PST 2023
Hi Matthew,
The distance text label in your image is pixelated because its quality does not automatically adjust when saving higher resolution images. This is a limitation of ChimeraX. But you can increase the quality of the text labels using the "size" option of the label command
label size 200
The value is the height in pixels of the rasterized label text. The default is 48 pixels.
Vector graphics are generally made up of single color shapes defined by equations (e.g. circles or splines). ChimeraX renders 3D graphics, so the shapes have no simple equations for the boundaries seen in a 2D image and also they are almost never single color because the 3D lighting varies the brightness even across a single atom. This is why you don't see any software producing vector graphics for 3D renderings. You are right vector graphics can produce small file sizes, but it only works for 2D single color shapes.
Tom
> On Feb 15, 2023, at 12:20 AM, Matthew Graneri via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi Elaine,
>
> That’s fair enough. You’re absolutely right - journals always seem to want tiff files (I cannot figure out why, though).
>
> I tried your suggestion, though, and while it kind of worked, there was a weird effect with the text in the saved image - for some reason, the text appears to be a significantly lower resolution to the rest of the image (I’ll attach a screenshot below). Do you have any idea why this might be happening?
>
> Also, just an FYI, the reason I like PDFs is because they use vector graphics. The way it was explained to me is that vector graphics make an image out of a set of mathematical functions, which means you can expand them to whatever size you like and they will maintain their resolution (a circle is always going to be round), to a point, at least. PNGs, JPEGs and TIFFs are bitmap images, which means they are made of an array of pixels, so, when you enlarge an image, the pixels simply expand (circles become a series of squares). It also means that the higher the resolution, the larger the file (whereas the number of functions in a PDF file remains constant). While this might sound like a trivial difference, when you’re writing a thesis in word, or compiling one in LaTeX, it can mean the difference between a 30 MB file or a 150 MB file.
>
> After a quick look, it seems like you can’t actually save images as vector graphics in ChimeraX. Is there a reason for that, or is it just chance? (Not criticising! Just curious.)
>
> Regards,
>
> Matthew
>
> <Screenshot 2023-02-15 at 4.07.27 pm.png>
>
>> On 15 Feb 2023, at 12:45 am, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>>
>> Hi Matthew,
>> There is no option in distance units like inches/centimers but you can specify a high resolution by specifying a high number of pixels. E.g. if you want the image to be 2 inches wide at 600 dpi then you need the image to be 1200 pixels wide. The file would not be marked with the 2 inches width, but you could set that in some separate image-editing application.
>>
>> There is no option to save PDF of the graphics window. It will not really save you in file size anyway when the contents include an image like a photo or molecular graphics. The PDF will be just as big as the resolution of the image requires.
>>
>> The filesize/resolution tradeoff is different for different image formats, and there are various types of compression available, and some formats are "lossless" and others are not. I'm not an expert on the details. I use TIFF and PNG when I want lossless (and those are the ones journals usually want), JPG if I'm willing to lower the quality.
>>
>> I hope this helps,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>
>>> On Feb 13, 2023, at 8:15 PM, Matthew Graneri via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>>>
>>> Hi there,
>>> I was wondering if there was an option to set the resolution of an image you want to export? In the older Chimera application, there were many more options open to you when you wanted to save an image (I’ve attached a screenshot of the old and new image saving screens for comparison). If not, is there any chance of implementing a resolution specification option sometime in the future?
>>>
>>> I was also wondering if it was possible to save images from ChimeraX as PDF files? I find that they usually maintain a high resolution without being particularly big, in terms of memory.
>>>
>>> Apart from that, really enjoying ChimeraX!
>>>
>>> Regards,
>>>
>>> Matthew
>>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20230215/3967c38a/attachment.html>
More information about the ChimeraX-users
mailing list