title: Data URI to Object URL with createObjectURL in chrome/ff
body: <p>I have base64 string of an image. How can I convert this to Object URL? The purpose is to try and see if my svg-editor will be faster, by injecting Blob URL to the DOM instead of a very large base64 string. This is used for editing the SVG only. On save, Object URLs are reconverted to base64 again.</p>
  
  <p>Image size is typically 0.5 MB or bigger.</p>
  
  <p>What I've tried:</p>
  
  <pre><code>var img = ...; //svg &lt;image&gt;
  var bb = new BlobBuilder();
  var dataStr = img.getAttributeNS(XLINKNS, 'href'); //data:image/jpeg;base64,xxxxxx
  //dataStr = dataStr.replace(/data:.+;base64,/i, ''); //Strip data: prefix - tried both with &amp; without
  //dataStr = window.atob(dataStr); //tried both with &amp; without
  
  bb.append(dataStr);
  var blob = bb.getBlob
  img.setAttributeNS(XLINKNS, 'xlink:href', window.URL.createObjectURL(blob)); //blob:xxx
  </code></pre>
  
  <p>What I get instead is a seemingly corrupted jpeg image.</p>
  
  <p>TIA.</p>