xfig produces illegal PNG file when exporting as PNG
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
transfig |
New
|
Undecided
|
Unassigned | ||
transfig (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
xfig (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: xfig
Summary: Exporting a figure as PNG with xfig produces illegal PNG file.
Steps to reproduce:
1/ start 'xfig foo.fig' from command line:
$ xfig foo.fig
2/ draw something (it does not matter what you draw)
3/ Export as PNG with: File -> Export
In the export dialog box, select "Language: PNG (Portable Network Graphic)"
and click "Export" button
4/ observe that xfig has produce file "foo.png" (so far so good)
5/ Now run "optipng" tool from command line with:
$ optipng foo.png
6/ Observe the following error:
$ optipng foo.png
OptiPNG 0.6.2.1: Advanced PNG optimizer.
Copyright (C) 2001-2009 Cosmin Truta.
** Processing: foo.png
Warning: Extraneous data found after IEND
39x39 pixels, 3x8 bits/pixel, RGB
Reducing image to 1 bit/pixel, 2 colors in palette
Recoverable errors found in input. Rerun OptiPNG with the -fix option.
Error: Previous error(s) not fixed
** Status report
1 file(s) have been processed.
1 error(s) have been encountered.
-> the PNG file is illegal. It can be corrected though with "optipng -fix foo.png".
I'm using xfig as shipped with Ubuntu 9.04 (Jaunty)
$ xfig -v
Xfig 3.2 patchlevel 5 (Protocol 3.2)
pngcheck tool also complains about the PNG file produced by xfig (so it's not only optipng):
$ pngcheck foo.png
foo.png additional data after IEND chunk