Patch to fix PNG with newer libpng

Hi All,

Apparently, some time ago, libpng made the png_info structure opaque. OSX has a newer version on libpng, so matplotlib would not compile. Attached is the _png.cpp that fixes this issue, I changed it to use the new libpng access routines.

This issue will certainly come up on any platform with newer libpng versions.

_png.cpp (13.4 KB)

Thanks for the report. This issue was fixed some time ago on the
maintenance branch, but we have not been very good at getting
maintenance releases out lately. Hopefully one will drop shortly.