code: function binaryStringToArrayBuffer(bin) {
    var length = bin.length;
    var buf = new ArrayBuffer(length);
    var arr = new Uint8Array(buf);
    for (var i = 0; i < length; i++) {
      arr[i] = bin.charCodeAt(i);
    }
    return buf;
  }
docs: From http://stackoverflow.com/questions/14967647/ (continues on next line) encode-decode-image-with-base64-breaks-image (2013-04-21)