Bug 2297

Summary: PNG backend doens't work for FORMAT_RGB24
Product: cairo Reporter: Owen Taylor <otaylor>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: jwatt
Version: 0.9.3   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to fix FORMAT_RGB24 writing to PNG

Description Owen Taylor 2005-01-17 10:48:05 UTC
If you create a PNG surface with CAIRO_FORMAT_RGB24, then output
is scrambed (multi-colored vertical stripes).

It looks like someone is passing native-endian xRGB where packed
RGB is expected.
Comment 1 Even Rouault 2005-05-28 07:28:12 UTC
Created attachment 2787 [details] [review]
Patch to fix FORMAT_RGB24 writing to PNG
Comment 2 Even Rouault 2005-05-28 07:28:52 UTC
Here's a patch that fixes that problem. It doesn't seem to be possible to use a 
user tranformation function to pack RGBx into RGB, so I'm doing the 
transformation into a temporary storage. 
Comment 3 Owen Taylor 2005-06-23 13:05:35 UTC
Fixed now in CVS... somewhat different, I didn't remember there was
a patch here, sorry.

2005-05-17  Owen Taylor  <otaylor@redhat.com>

        * src/cairo-png.c (write_png): Only unpremultiply ARGB32 data,
        do a simpler conversion for RGB24 data (fixes #2297)
        Call png_write_info() *before* we set up the write conversion...
        it doesn't work after.
Comment 4 Carl Worth 2005-08-22 17:14:14 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.