Bug 2297 - PNG backend doens't work for FORMAT_RGB24
Summary: PNG backend doens't work for FORMAT_RGB24
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-17 10:48 UTC by Owen Taylor
Modified: 2005-08-22 00:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix FORMAT_RGB24 writing to PNG (1.98 KB, patch)
2005-05-28 07:28 UTC, Even Rouault
Details | Splinter Review

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.