- Join us
Bmp2eps converts from BMP/GIF/PNG/JPEG/PNM/TGA to PS/EPS/PDF. So what? you might ask, so do many other programs.
The main claim to fame of bmp2eps is that JPEG images are never decompressed then recompressed, they are simply transferred straight to PostScript or PDF, both of which support JPEG's compression algorithm, without further, potentially lossy, decompression and recompression. It is also the case that bmp2eps tries to make its output as small as possible. In many cases it can produce EPS files which are smaller than the GIFs on which they are based. In 2012 I produced a comparison of how programs treat JPEGs.
The program is distributed as source, and needs remarkably few libraries, just zlib. Its internal PNG reader is, as of version 1.25, sufficiently good that there is little point linking against libpng. It will even build without zlib, but its compression becomes much poorer at that point, and the number of PNG files it can read decreases significantly. Windows compilations are easier without libpng.
It can also produce PNG output. This is often smaller than its input, but there are other PNG crushers, such as pngcrush. For some images bmp2eps does do quite well compared to dedicated crushers, for others it gets beaten. Finding the absolutely minimal PNG representation of an image is a very hard task.
- Generic source tarball: bmp2eps-1.30b.tgz, (and the older versions bmp2eps-1.25.tgz 1.20a, 1.19, 1.16, 1.10 and 1.00)
- Man page as html or nroff
- Linux, x86_64, version 1.30b bmp2eps.
- MacOS 10.8 or later, version 1.30b bmp2eps. (Older versions: MacOS 10.8, version 1.25 bmp2eps-1.25, MacOS 10.6, version 1.19 bmp2eps-1.19 (requires libpng); MacOS 10.8, version 1.19 bmp2eps-1.19-nolibpng (omits libpng), MacOS 10.5 Intel 32 bit, version 1.00 bmp2eps-1.00)
- Windows XP (or more recent!), 32 bit, version 1.19 bmp2eps-1.19.exe (omits libpng)
The program for performing the opposite conversion, that of finding JPEG images in PostScript files, and extracting them to JPEGs without any decompression and recompression stages, is psimages, which relies on ghostscript. For the same applied to PDF files, it is pdfimages from xpdf.
As of version 1.30 and 1.30a, bmp2eps has good support for writing HP's RTL in the format that its old DesignJet 1050 series of printers understands. This means that it can transfer a rasterised image to one of these large-format (36 inch wide) printers. For something rather more modern, it can output JPEG or PNG files Base64 encoded for inline inclusion in web pages.
Some may be upset by the name. I changed from jpeg2eps to bmp2eps in 2003, when support for gif, pnm and bmp was first added. The code was not widely known or distributed back then (it was known to around a hundred people). I had written jpeg2eps in March 2001. Yes, it took nine years for me to bother to release this under the GPL! There are now other utilities of overlapping functionality, which have been developed entirely independently of this code.
Some of this code is re-used in the excellent plotting package PyXPlot.
Major changes between 1.20a and 1.30 include:
- Output of SVG and HTML
- PDF output supports soft masks (i.e. an alpha channel)
- EPS output defaults to level 3 with no protection for level 2 interpreters
- EPS output supports hard (single bit) masks as an approximation to an alpha channel
- zlib compression improved in some cases
- internal PNG reader greatly improved, and made the default over libpng
This code has nothing to do with the University which happens to give its author a stipend. It is provided with no form of warrenty or statement of fitness for purpose, but merely under version two of the Gnu Public Licence.