Issues with sam2p and removal
I have been maintaining the Debian package of sam2p for some time. Unfortunately, the upstream development of that program is no longer active, and it is using an old custom build chain that no longer works with recent version of GCC.
This package is currently failing to build from source, and while I have been able to patch some issues in the past, and it may still be possible to fix it again, this is not really sustainable.
I am therefore considering to remove sam2p from Debian, unless someone has a very good reason to keep it and is able and willing to maintain it.
sam2p is a raster image conversion tool that can convert PNG and JPEG to EPS and PDF while keeping their compression, which is mostly useful to use them in documents compiled with LaTeX. Fortunately, the same can be done with ImageMagick. If you want to convert to EPS, you have to specify that you want EPS 2 or 3, otherwise it would produce EPS level 1 which does not provide native raster compression:
% convert debian-openlogo-raster100.png \ eps3:debian-openlogo-raster100.eps % convert debian-openlogo-raster100.png \ debian-openlogo-raster100.pdf % ls -lh 1.7K debian-openlogo-raster100.png 6.0K debian-openlogo-raster100.eps 8.8K debian-openlogo-raster100.pdf % convert photograph.jpg eps3:photograph.eps % convert photograph.jpg photograph.pdf % ls -lh 657K photograph.jpg 662K photograph.eps 664K photograph.pdf % convert scanned-document.png eps3:scanned-document.eps % convert scanned-document.png scanned-document.pdf 140K scanned-document.png 145K scanned-document.eps 150K scanned-document.pdf
This is a bit less efficient than sam2p, as convert seems to add some fixed overhead, but it does keep the appropriate compression algorithm. See this documentation page from ImageMagick for more information.
Using appropriate formats
As a reminder, when writing LaTeX documents, depending on your build chain, you can use:
- JPEG or EPS (converted from JPEG with ImageMagick);
- raster drawings, screenshots…
- PNG or EPS (converted from PNG with ImageMagick);
- vector graphics
- PDF or EPS (convertes from SVG with Inkscape).