Re: cairo built against libpng16
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 20, 2013 at 11:11:24AM +0100, [email protected] 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 > <[email protected]> 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 <[email protected]> > +1 (541) 450-9885 > PO BOX 3151 > KERBY OR 97531-3151 > USA ~ -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlFJjUQACgkQGevYtT2kPwPNmQCgkVqkJyUc/8qnJEmz90TEh8rC eowAmgPLfrGl24z9GxxjR2QMOt4/PJkx =KK/9 -----END PGP SIGNATURE-----