ixfx
    Preparing search index...

    Function copyToImg

    • Creates a new HTML IMG element with a snapshot of the canvas. Element will need to be inserted into the document.

      const myCanvas = document.getElementById('someCanvas');
      const el = copyToImg(myCanvas);
      document.getElementById('images').appendChild(el);

      Parameters

      • canvasEl: HTMLCanvasElement

      Returns HTMLImageElement