

      let lastElement = element;

      for (let file of fileArr) {
        for (let rad of [-0.2, -0.1, 0.1, 0.2]) {
          const newElement = element.cloneNode(true);

          // Create the rotated images
          const ret1 = await worker.recognize(file, { rotateRadians: rad }, { text: false, blocks: false, hocr: false, tsv: false, imageColor: true });

          newElement.children[0].children[1].src = ret1.data.imageColor;

          // Attempt to remove the rotation using the auto-rotate featu