After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653882 - (dia-libpng1.5) dia-0.97.1 fix for libpng-1.5
(dia-libpng1.5)
dia-0.97.1 fix for libpng-1.5
Status: RESOLVED DUPLICATE of bug 642764
Product: dia
Classification: Other
Component: exports
0.97.x
Other Linux
: Normal critical
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-03 03:31 UTC by Stuart Longland
Modified: 2011-07-04 01:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dia-0.97.1 fix for libpng 1.5 (408 bytes, patch)
2011-07-03 03:31 UTC, Stuart Longland
none Details | Review

Description Stuart Longland 2011-07-03 03:31:16 UTC
Created attachment 191173 [details] [review]
dia-0.97.1 fix for libpng 1.5

dia-0.97.1 presently fails when compiled against libpng-1.5 due to it directly accessing libpng's private structure members which is officially deprecated now.

Currently, libpng-1.5 users will receive an error similar to the following:

export_png.c: In function ‘export_png_ok’:
export_png.c:181: error: dereferencing pointer to incomplete type
make: *** [export_png.lo] Error 1

Attached is a patch that corrects dia for libpng-1.5, with one bug: the blue channel is not written, so the image is exported with a distinct yellow colouring.  I'll attach an updated patch if I figure out how to fix that, but at least it compiles with the attached patch.
Comment 1 Hans Breuer 2011-07-03 11:10:51 UTC
Thanks for the fix. It is already available in both branches. For dia-0-97 see:
http://git.gnome.org./browse/dia/commit/?id=59f67782b9e382b2d71aeabbd493799b179bdec0
(bug #642764)

For the missing blue channel: it does not happen for me with libpng-1.4.3
Comment 2 Stuart Longland 2011-07-03 11:23:39 UTC
Ahh okay, so really this should be a duplicate of bug 642764… :-)

I did some further investigations, I got the missing blue channel if I exported using "Cairo (PNG)".  If I tell it to use PNG (further down the list), it exports fine.  I have been trying to build the later Inkscape releases to see if it too, exhibits the same fault, as it could be Cairo misbehaving.

The machine I'm seeing this on is a P4 2GHz laptop, getting a bit long in the tooth so builds take a while. :-)
Comment 3 Stuart Longland 2011-07-04 01:29:17 UTC
Okay, I can be pretty certain that the bug I'm seeing now is either a bug in Cairo or libpng when exporting 24-bit RGB PNGs.

I do not see colour issues when exporting RGBA PNGs via Cairo, or when exporting directly using the "PNG (anti aliased)" option, but I do see it when exporting PNGs using Cairo without the alpha channel.

So the libpng-1.5 fix is a duplicate, and the yellow images are a Cairo bug as best I can determine.  Resolving as duplicate and taking my bug over to freedesktop.org bugzilla.

*** This bug has been marked as a duplicate of bug 642764 ***