Enhance png optimizer logic.