docs: function dataURItoBuffer(dataURI){
      var byteString = atob(dataURI.split(',')[1]);
      var buffer = new ArrayBuffer(byteString.length);
      var view = new Uint8Array(buffer);
      for (var i = 0; i < byteString.length; i++) {
          view[i] = byteString.charCodeAt(i);
      }
      return buffer;
  }