title: Return binary result from phantomjs webserver
body: <p>Is there any way to return result froma PhantomJS webserver as binary?</p>
  
  <p>To be more specific, If I render a screenshot of a page as base64, can I then transform this base64 string into binary and return it so the client receives it as an image?</p>
  
  <p>This is what I have so far, I've commented out some of my experiments which apparently doesnt work</p>
  
  <pre><code>response.statusCode = 200;
  response.setHeader("Content-Type", "image/png");
  //response.setHeader("Content-Encoding","base64");
  var base64 = page.renderBase64('png');
  //var binary=atob(base64,"b");
  response.write(base64  );
  response.close();       
  </code></pre>
  
  <p>Ideas?</p>