add createPNG() example to document

It took me a little while to figure out how to use createPNG(), so I thought it maybe good to add an example in the documentation.