Bug 188597 - ppmtogif no longer works in netpbm 10.33
Summary: ppmtogif no longer works in netpbm 10.33
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: netpbm
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Ben Levenson
URL:
Whiteboard:
: 188592 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-11 16:33 UTC by Gilles Detillieux
Modified: 2013-07-02 23:15 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-04-18 12:28:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fix for ppmtogif bug in netpbm 10.33 (611 bytes, patch)
2006-04-11 18:20 UTC, Gilles Detillieux
no flags Details | Diff

Description Gilles Detillieux 2006-04-11 16:33:09 UTC
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):
10.33-0.FC4

How reproducible:
Always

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
  
Actual results:
eog reports...
loading failed: t.gif
loading failed: GIF image loader cannot understand this image..

giftopnm reports...
giftopnm: Error in GIF image: contains LZW string loop
giftopnm: Error in GIF input stream

Expected results:
Display of a lovely teapot image from eog.

Additional info:
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.

Comment 1 Gilles Detillieux 2006-04-11 18:20:20 UTC
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.

Comment 2 Jindrich Novy 2006-04-13 07:59:59 UTC
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.

Comment 3 Jindrich Novy 2006-04-13 08:15:56 UTC
*** Bug 188592 has been marked as a duplicate of this bug. ***

Comment 4 Jindrich Novy 2006-04-13 14:44:35 UTC
It's now fixed in rawhide.

Comment 5 Fedora Update System 2006-04-17 15:41:24 UTC
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.

Comment 6 Fedora Update System 2006-04-17 15:41:54 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.