Bug 1371667

Summary: fig2dev: libpng error: invalid file gamma in png_set_gamma
Product: [Fedora] Fedora Reporter: Rick Richardson <rickrich>
Component: transfigAssignee: Tomas Repik <trepik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: hhorak, jmlich83, rickrich, trepik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: transfig-3.2.6-2.fc24 transfig-3.2.6-2.fc23 transfig-3.2.6-2.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-19 14:20:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
archoak.fig
none
images/km-1635.png
none
images/1500.gif
none
ubuntu 14.04 output file xxx.gif
none
fedora 23 output file xxx.gif none

Description Rick Richardson 2016-08-30 18:31:55 UTC
Created attachment 1196049 [details]
archoak.fig

$ fig2dev -L gif archoak.fig > xxx.gif
libpng error: invalid file gamma in png_set_gamma
images/km-1635.png: Bad PNG format


It was good in Fedora 9 to around 21 or 22.  Now the picture of Kyocera KM-1635 is gone!

$ xfig archoak.fig 

shows that it is there. So xfig is fine.

Comment 1 Rick Richardson 2016-08-30 18:34:46 UTC
Created attachment 1196050 [details]
images/km-1635.png

Comment 2 Rick Richardson 2016-08-30 18:36:03 UTC
Created attachment 1196052 [details]
images/1500.gif

Comment 3 Rick Richardson 2016-08-30 20:12:21 UTC
Note: Ubuntu 14.04 converts it right...

ubuntu14$ fig2dev -L gif archoak.fig > xxx.gif
ubuntu14$

I put the ubuntu output in an attachment.

Comment 4 Rick Richardson 2016-08-30 20:14:36 UTC
Created attachment 1196073 [details]
ubuntu 14.04 output file xxx.gif

Comment 5 Rick Richardson 2016-08-30 20:17:19 UTC
Created attachment 1196074 [details]
fedora 23 output file xxx.gif

Comment 6 Rick Richardson 2016-08-30 22:34:49 UTC
If I comment out the line in transfig/fig2dev/dev/readpng.c:

    // png_set_gamma(png_ptr, 2.2, gamma);

everything works again.

Please fix!

Comment 7 Rick Richardson 2016-08-31 20:00:22 UTC
I think it is due to the alpha transparency of the km-1635.png image.

If I do:

$ cd images
$ convert km-1635.png xxx.png
$ mv xxx.png km-1635.png

it works.  But the alpha transparency is gone.

Ref:
http://www.imagemagick.org/script/convert.php
https://docs.gimp.org/en/gimp-using-web-transparency.html

Comment 8 Rick Richardson 2016-08-31 20:36:01 UTC
This does it:

$ cd images
$ convert -alpha Set km-1635.png km-1635.png 
$ convert -alpha Set 6015.png 6015.png 
$ convert -alpha Set hpcp1215.png hpcp1215.png 
$ convert -alpha Set p2014.png p2014.png 
$ convert -alpha Set p1505.png p1505.png 
$ convert -alpha Set CP1025nw.png CP1025nw.png 
$ cvs com
$

Don't know why it does it, though. The transparency is on in both cases.

Comment 9 Tomas Repik 2016-09-09 10:13:31 UTC
When trying to reproduce I came across other issues:

What I did:
# dnf install transfig
# fig2dev -L gif archoak.fig > xxx.gif

What I got:
sh: giftopnm: command not found
images/1500.gif: Bad GIF format
fig2dev: error while converting image.
Command used:
  (ppmquant 256 /tmp/f2d157.ppm | ppmtogif) 2> /tmp/f2d157.err
Messages resulting:
  sh: ppmquant: command not found
  sh: ppmtogif: command not found

I giftopnm, ppmquant, ppmtogif should be provided by netpbm package but after doing:
# dnf install netpbm
I got the same result

I will investigate it more deeply next week.

Comment 10 Tomas Repik 2016-09-19 13:15:11 UTC
Well after help from Hans I managed to reproduce the scenario. We discovered a missing dependency. I included it and rebuilt the package in rawhide. http://koji.fedoraproject.org/koji/taskinfo?taskID=15706267

Do you still demand fixing in F23/F24?

Comment 11 Rick Richardson 2016-09-26 07:21:33 UTC
I'm on F23, and won't be on F24 till F25 is released. About December for F24 install.

Comment 12 Fedora Update System 2016-10-03 14:23:50 UTC
transfig-3.2.6-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d161da2639

Comment 13 Fedora Update System 2016-10-07 09:25:13 UTC
transfig-3.2.6-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-652a4396d8

Comment 14 Fedora Update System 2016-10-07 09:58:40 UTC
transfig-3.2.6-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b0bdfe7f4c

Comment 15 Fedora Update System 2016-10-19 14:20:45 UTC
transfig-3.2.6-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-10-19 17:21:28 UTC
transfig-3.2.6-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2016-10-19 17:27:49 UTC
transfig-3.2.6-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.