ps_to_png


ps_to_png, a BASH code which uses ghostscript() to convert a graphics file from PostScript to PNG format.

At one time, the ImageMagick program convert() would do this job. However, because of a security problem within the PostScript language, convert() will now refuse to handle PostScript files!

A program like FreeFem++ will output graphics in PostScript format, and it is useful to have a code that will automatically convert this to PNG format, as part of a job script.

One flaw I have noticed is that lines drawn by FreeFem++ are rendered very thin in the final PNG output. I have been unable to find an appropriate remedy in the scanty GhostScript documentation.

A better solution than this script is to use the GhostScript function ps2png, if you can find and install it!

Licensing:

GNU LGPL

Source Code:


Last revised on 30 April 2020.