[cairo] cairo built against libpng16

pgajdos at suse.cz pgajdos at suse.cz
Wed Mar 20 03:19:48 PDT 2013


On Wed, Mar 20, 2013 at 11:11:24AM +0100, pgajdos at suse.cz wrote:
> #2  0x00007ffff7b4d1af in read_png (png_closure=0x7fffffffe7f0) at
> cairo-png.c:651
[...]
> 102              png_app_error(png_ptr,
> 103                 "invalid after png_start_read_image or
> png_read_update_info");

Seems that png_set_read_user_transform_fn() needs to be moved before
png_read_update_info() call. Glenn, John, correct?

There is similar issue in perl-Tk. What Glenn and John said back 
then:

On Tue, Feb 26, 2013 at 09:23:55AM -0800, John Bowler wrote:
> On Tue, Feb 26, 2013 at 5:07 AM, Glenn Randers-Pehrson
> <glennrp at gmail.com> wrote:
> > I believe the problem is that png_set_gamma() can no longer
> > (using libpng-1.6.0 and later)
> > appear after png_read_update_info().  In the past it was
> > allowed but transformations involving background and
> > gamma may have been incorrect.
> 
> That's correct; the png_get calls made *before* png_read_update_info
> return the original image information, the png_get calls made
> *after*
> are intended to return information about the transformed image
> (intended - there are bugs).  Therefore all transformations which
> change the information must be set before png_read_update_info is
> called.
> 
> The effect of not doing so was undefined before 1.6 - some things
> worked, some things didn't.  1.6 should consistently signal the
> problem with png_app_error.  You can turn it off with
> png_set_benign_errors(png_ptr, 1/*allowed*/), then you will just get
> a
> warning and the old undefined behavior from 1.5 (which may or may
> not
> have been the same as the undefined behavior in 1.4).  If you do
> this,
> however, the behavior may change quite radically in 1.7 - it's
> better
> to fix the code.
> 
> -- 
> John Bowler <john.cunningham.bowler at gmail.com>
> +1 (541) 450-9885
> PO BOX 3151
> KERBY OR 97531-3151
> USA
~                      

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130320/2d759ed5/attachment.pgp>


More information about the cairo mailing list