title: nodejs server, write out png to response page
body: <p>I am using the node-png library to make the png and then save it in the local directory but when I go to open it back up, it says that it does not exist. I want to either read in the data and send it out or just have the response send an <code>&lt;img&gt;</code> field with the picture. Here's what I have so far:</p>
  
  <pre><code>//write out img data
  png.pack().pipe(dst);
  
  //link to new image made
  var link = fs.createReadStream('out.png'); //says that this does not exist
  
  //write out response with img then delete file
  response.writeHead(200, {"Content-Type": "image/png"});
  response.end(link, 'binary');
  </code></pre>