Improves the unit test for PNG support and fixes a bug in PNGImage