[cairo-bugs] [Bug 38938] New: cairo-1.10.2 renders RGB PNGs without blue channel (yellow colouring)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 3 18:36:54 PDT 2011


           Summary: cairo-1.10.2 renders RGB PNGs without blue channel
                    (yellow colouring)
           Product: cairo
           Version: 1.10.3
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: png functions
        AssignedTo: cworth at cworth.org
        ReportedBy: redhatter at gentoo.org
         QAContact: cairo-bugs at cairographics.org

Created an attachment (id=48722)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=48722)
Test diagram from 'dia'

Hi all...

Been chasing a few libpng-1.5 related issues, namely after porting dia across
to libpng-1.5, I noticed it had a distinct yellow colouring to the exported

Affected machine is running Gentoo Linux i686.

Thinking this was a bug with dia, I dug a little further.  dia provides three
options for exporting to PNG:

- Cairo PNG
- Cairo PNG (with alpha)
- PNG (anti-aliased)

The latter two work fine, as does the PNG export in Inkscape (which uses Cairo
to generate RGBA PNGs as far as I know).  The former one lacks the blue
channel.  I still wasn't sure if this was a result of my porting or not, so I
left it at that point.

Then I noticed graphviz on my other system (running the AMD64 variant of
Gentoo), also using libpng-1.5, started misbehaving with respect to PNG image
generation with the same symptoms.

Lo and behold, I try the same thing on this i686 system, and the images once
again come out yellow in colour.  Two different programs, two different
systems, same bug.

Going back to dia, I have created a test diagram which I have tried to export
as PNG using all three methods.  I shall attach the diagram now, and the
results in a moment.  You will notice that the RGB PNG generated by dia itself
(without Cairo), and the RGBA PNG generated by Cairo are fine, but the RGB PNG
generated by Cairo lacks the blue channel.

I haven't yet gone digging to find out why, nor have I seen other bug reports
that would indicate what is going on.

Stuart Longland

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list