windowscodecs: Define a custom png error handler.