remove unused write_png function.

Signed-off-by: Jack <jack.wgm@gmail.com>