Tweak the parsePng method