Adds toBuffer, pngStream and jpegStream TCP examples.