[texhax] help

Reinhard Kotucha reinhard.kotucha at web.de
Thu Nov 22 01:24:21 CET 2018

On 2018-11-21 at 12:00:35 +0000, Lars Madsen wrote:

 > Reinhard, thanks for mentioning this, I never even realised that
 > PNG was an issue link that.
 > Do you have more information about this? Especially which is better
 > to use for quality (and speed)

Hi Lars,
do you ask whether PNG or PDF bitmaps are better?  You don't have a
choice anyway because PDF doesn't support PNG.  So the question is
whether sam2p or libpng is better.

Péter Szabó told me that sam2p removes redundancy from bitmap images
without degrading quality. This is possible because there is not only
one way to create a valid PNG file.

As far as speed is concerned, I think that it's more efficient to
convert PNG to PDF in advance because the PDF file can be used as-is,
without any further processing.

Aside from the fact that sam2p supports zillions of bitmap formats, it
always creates very small files.

PostScript didn't support compression prior to PS Level 2.  But even
if your ancient PostScript interpreter doesn't support Level 2, sam2p
is able to support compression though.  It "simply" adds a
de-compressor written in PostScript to the file.  Péter obviously had
file size in mind from the beginning.

 > I did a test on a preprint, where if we use PNG versions of some
 > tif files it ends up at 50Mb, converting the tifs to pdf using
 > sam2p reduced this to 30.

I'm not surprised.

Lars, I must admit that I wasn't aware of sam2p and textrace until I
spent a whole evening with Péter Szabó at the ENST cafeteria during
EuroTeX 2003 in Brest while you preferred to waste your time at the
conference dinner. ;)


Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de

More information about the texhax mailing list