code: function getImageData(img) {
    let data = null;
    return new Promise((reslove, reject) => {
      if (img.src) {
        if (/^data\:/i.test(img.src)) { // Data URI
          data = base64ToArrayBuffer(img.src);
          reslove(data)
        } else if (/^blob\:/i.test(img.src)) { // Object URL
          var fileReader = new FileReader();
          fileReader.onload = function (e) {
            data = e.target.result;
            reslove(data)
          };
          objectURLToBlob(img.src, function (blob) {
            fileReader.readAsArrayBuffer(blob);
          });
        } else {
          var http = new XMLHttpRequest();
          http.onload = function () {
            if (this.status == 200 || this.status === 0) {
              data = http.response
              reslove(data)
            } else {
              throw "Could not load image";
            }
            http = null;
          };
          http.open("GET", img.src, true);
          http.responseType = "arraybuffer";
          http.send(null);
        }
      } else {
        reject('img error')
      }
    })
  }
docs: 这里的获取exif要将图片转ArrayBuffer对象，这里假设获取了图片的baes64 步骤一 base64转ArrayBuffer对象