Created attachment 77910 [details] Fix read_png with libpng 1.6 With libpng 1.6, png_read_update_info() needs to be called after transformations. http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng/libpng;a=blob;f=libpng-manual.txt;hb=HEAD#l4983 The attached patch fixes it on my side.
The patch is wrong. And the new requirement is really stupid, since to set the transform function we want to know what color type is going to be output by libpng, and to have that we have to call png_read_update_info().
Yeah, ickle pointed that out. I've asked on libpng mailing list what would be the correct way to fix it since png_read_update_info() can't be used like this with libpng 1.6.
Thanks for following up with them.
- png_read_update_info (png, info); + info = NULL; + png_read_info (png, info); This appears to work, too. It doesn't work without unseting the info variable. If it's okay with you, I'll attach a new patch.
Someone responded at libpng mailing list and the response is here: http://sourceforge.net/mailarchive/forum.php?thread_name=CAP7U39-d%3DBTERc7zkYhj%2BGr-_7p2rWzHCW10XPCEm77RiNj-Zw%40mail.gmail.com&forum_name=png-mng-implement I admit that I don't really understand what he's saying - maybe someone here could figure it out?
Ok, an update They have fixed it on their side. http://sourceforge.net/mailarchive/forum.php?thread_name=CAP7U398nvHWhg8mFYVTs4AoFHy65Zovb0M02G2RFXvDu768WsA%40mail.gmail.com&forum_name=png-mng-implement http://sourceforge.net/mailarchive/forum.php?thread_name=CAP7U39-3iyn0HgdPHd%3DS3rbBohFEdA6JzNNGN7-Xtf1rjsV-pg%40mail.gmail.com&forum_name=png-mng-implement I guess as soon as libpng 1.6.2 is released this bug can be closed.
*** Bug 62779 has been marked as a duplicate of this bug. ***
Appears to work with libpng 1.6.2 which was released yesterday.
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.