Png2eps is a small shell script to create an EPS (Encapsulated Postscript) file from a PNG (Portable Network Graphics) bitmap. The intention is to create a graphics format which can be included into LaTeX documents. It was developed for simultaneous production of PDF documents (with pdflatex which can handle PNG) and PS documents (with latex which can handle EPS). If you need to include bitmap graphics, you store it in PNG format and then run png2eps to create an EPS version. A better solution for JPEG graphics is jpeg2ps.
If available, LZW compression is used to reduce the size of the EPS file. All pixels are arranged in one single strip which also reduces the size of the output file and because with a smaller strip size my HP LJ 6MP printer had some problems printing those files.
The original resolution of the PNG file is also preserved, so an inclusion with \includegraphics should deliver the same figure size (even without the width or height parameters.
png2eps m2.png > m2.epsresults in this EPS file (file size: 20423 bytes). The decompression ratio is 1.4 (quite good).
Png2eps requires netpbm 10.1 or higher. For older netpbm versions, edit the script and remove the -indexbits=... option. (garbage in unused colormap entries, No colormaps < 8 bits; slightly larger EPS files)
The programs you need are available from GnuWin32. A png2eps batch file is also available.
Diese Seite ist ein Angebot von Dipl.-Ing. Thomas Henlich - Ingenieurdienstleistungen & Technische Beratung, Heilbronn (Datenschutz & Impressum)