[Bug 810701] New: cairo call png_set_read_user_transform_fn() after png_read_update_info()
https://bugzilla.novell.com/show_bug.cgi?id=810701 https://bugzilla.novell.com/show_bug.cgi?id=810701#c0 Summary: cairo call png_set_read_user_transform_fn() after png_read_update_info() Classification: openSUSE Product: openSUSE Factory Version: 13.1 Milestone 0 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: pgajdos@suse.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- In the cairo-png.c there is: png_read_update_info (png, info); [...] switch (color_type) { default: ASSERT_NOT_REACHED; /* fall-through just in case ;-) */ case PNG_COLOR_TYPE_RGB_ALPHA: format = CAIRO_FORMAT_ARGB32; png_set_read_user_transform_fn (png, premultiply_data); break; case PNG_COLOR_TYPE_RGB: format = CAIRO_FORMAT_RGB24; png_set_read_user_transform_fn (png, convert_bytes_to_data); break; } But this turns in error in libpng16. JFYI, cairo wrongly reports 'no-memory', but it actually causes libpng error "invalid after png_start_read_image or png_read_update_info". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c1
Petr Gajdos
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c2
--- Comment #2 from Petr Gajdos
Seems that png_set_read_user_transform_fn() needs to be moved before png_read_update_info() call. Glenn, John, correct?
Yes
There is similar issue in perl-Tk.
Yes. What Cairo is doing is apparently harmless, but it does depend
on whether it calls png_set_user_transform_info too; that must
certainly come before png_read_update_info.
Turning the error into a warning will *not* work in this case, because
even if libpng just does a warning it does not set the callback so
Cairo will, presumably, get messed up images.
We could change 1.6.1 so that it is possible to change the callback on
the fly (as before), but I can't see that this is particularly useful
and it is a significant new support requirement. It would also be the
only one of the png_set_ functions that supports this (in all the
other cases the behavior is undefined.)
John Bowler
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c3
Petr Gajdos
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c4
--- Comment #4 from Petr Gajdos
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c5
Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c6
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c7
--- Comment #7 from Dominique Leuenberger
https://bugzilla.novell.com/show_bug.cgi?id=810701
https://bugzilla.novell.com/show_bug.cgi?id=810701#c8
--- Comment #8 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com