title: Converting a UIImage into a data URI
body: <p>Suppose I have a <code>UIImage</code> instance that I would like to convert into a data URI and inject into a <code>UIWebView.</code></p>
  
  <p>I know I can convert the UIImage to PNG/JPEG <code>NSData</code> using <code>PNGRepresentation</code>/<code>JPEGRepresentation</code> methods. But then how do I make sure that the conversion is base64? And then how do I create a string with the actual URI and headers present?</p>