to keep libpng from writing crap on stderr you have to set some kind of error func, see gtk+/gdk-pixbuf/io-png.c for an example.
commit ae991a0657be38e0056ba0ed6f85f43a35959a19 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Apr 23 13:00:40 2007 +0100 Do not print out libpng error messages to stderr. We wish to avoid writing to file descriptors (and streams) that are outside cairo's control. In this case, the messages are superfluous as the errors are propagated via the cairo_status_t returns.
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.