Re: Exporting image files #HowTo #dxf

Michael Rozeboom

On 2020-01-20 12:37 p.m., Martin Fischer wrote:

without going into a deeper technical discussion: I think a lossless compressed format would be more suitable for XTrackCAD. So I‘d suggest PNG! 

I would agree with that, as PNG was designed for graphics, not photos.  Its purpose was to replace the patent encumbered GIF format.

Am 20.01.2020 um 16:45 schrieb Adam Richards <adamjmrichards@...>:

A BMP as I noted is a dump of bits (no compression). This means you have a large file with every pixels x color depth in it.  If you scale them they attempt to fill in the blanks by interpolation. That process necessarily smudges fine details because the edge is an edge but the scaling doesn't know that and produces either a fatter copy or a gradient depending on the contents of the two pixels. This is also true as the image scales down where the choice is what to make each output bit. Basically, unless you use the BMP at its original size the result will be poor. 

My apologies, I had assumed you knew that formats such as JPGs were designed to reduce the size of an image while preserving the detail by running a compression algorithm. The JPEG algorithm was originally created to compress huge images into a form that did not lose fidelity when scaled, in fact. I thought that would be the reason you were using GIMP!! 

One of the characteristics of JPG is to encode the edges since, in effect, the displayed image is always "scaled" to get back to the original. That makes a JPG better (although not perfect) at scaling especially down. The quality setting on the JPG export will enable you to balance file size versus scalability. More compression (lower quality) gives a smaller file but loses some detail - this means the result will be OK if scaled down from the original but may suffer as it scales up compared to high quality (less compression, bigger file).  In all cases of a layout, where there are comparatively large areas of single colors (including white) compression can be highly effective.

So overall, exporting a BMP as large as you can, and then encoding it as a JPG will result in a smaller but high quality file. 

We could add a JPG output option - at least in V6. GTK natively supports the output format, so once we are on a unified UI it will be simple to do. I have added it to the solution requests. 



Michael Rozeboom

Team Amiga

DCC Wiki Admin

Join to automatically receive all group messages.