Allow benign PNG errors
Otherwise we can end up not writing anything due to recoverable libpng error reports.
(cherry picked from commit 9e690743135ff6be8a607cf84c252e7fe4551a7b)