Red Hat Bugzilla – Bug 188597
ppmtogif no longer works in netpbm 10.33
Last modified: 2013-07-02 19:15:11 EDT
Description of problem:
Conversion of PPM to GIF no longer works after installing recent netpbm-progs
update (to version 10.33-0).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. pnmquant 256 < /usr/share/tk8.4/demos/images/teapot.ppm | ppmtogif > t.gif
2. eog t.gif
3. giftopnm t.gif
loading failed: t.gif
loading failed: GIF image loader cannot understand this image..
giftopnm: Error in GIF image: contains LZW string loop
giftopnm: Error in GIF input stream
Display of a lovely teapot image from eog.
Replacing /usr/bin/ppmtogif with an older version restores proper behaviour.
Current version also sometimes produces GIF images that cause eog to fail with a
stack overflow. Corrupt GIFs from ppmtogif also don't display in Firefox, and
they're much smaller than the valid GIFs produced by previous versions. Running
the new version of ppmtogif with the -nolzw option produces a GIF that eog can
display, so the problem would seem to be in the LZW compression.
Created attachment 127630 [details]
fix for ppmtogif bug in netpbm 10.33
This patch fixes the problem. Whoever was rewriting the output() function in
ppmtogif.c didn't understand the concept of initialization of static variables.
The curAccum and curBits variables need to be initialized once only, not on
every call of the output() function.
Yes, this is likely. Upstream did a lot of breakages in the recent time (the
last one was ppmtompeg segfault). Of course the variables need to be initialized
first. Thanks for the patch. Confirmed it fixes the problem.
*** Bug 188592 has been marked as a duplicate of this bug. ***
It's now fixed in rawhide.
netpbm-10.33-1.FC4 has been pushed for fc4, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.
netpbm-10.33-1.fc5 has been pushed for fc5, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.