add png colortype detecting part