Added optional converting for PNG