Hi,
ppmquant -floyd 256
sometimes produces incorrect output, i.e. an image which is visually corrupt. This
is bad because 'latex2html' runs ppmquant with exactly that argument for images
it converts.
Shortest sequence I know of to trigger the bug:
mkdir netpbm_bug
cd netpbm_bug
wget http://corelatus.se/~matthias/ppmquant_bug_report.pnm
ppmquant -floyd 256 < ppmquant_bug_report.pnm > broken.pnm
On my PC, this creates a bad image approximately 30% of the time I run 'ppmquant'.
For reference, I've also uploaded a bad image:
http://corelatus.se/~matthias/ppmquant_broken.pnm
Replacing the '256' in the argument to ppmquant with 16 seems to produce a corrupt
image every time.
--------------------
The manual for the _upstream_ version of the netpbm says:
| ppmquant is obsolete.
...
| Note: The reason ppmquant was changed in Netpbm 10.19 is that for some time before that,
| ppmquant had a serious bug that would have been difficult to fix -- it chose the wrong color set.
Using 'pnmquant' instead of 'ppmquant' fixes the problem I described above, but
a larger problem remains: latex2html still uses ppmquant. An easy fix would be
to remove ppmquant and replace it with a wrapper for pnmquant.
I have not submitted a separate bug report for latex2html because the real problem
is in netpbm.
Regards,
Matthias