Functioning PNG writer