title: Uint8Array to image in JavaScript
body: <p>I have Uint8Array named frameBytes. I have created RGBA values from this byte array with this code.</p>
  <pre><code>    for (var i = 0; i &lt; frameBytes.length; i++) {
          imgData.data[4 * i] = frameBytes[i];// red
          imgData.data[4 * i + 1] = frameBytes[i]; // green
          imgData.data[4 * i + 2] = frameBytes[i];// blue
          imgData.data[4 * i + 3] = 255; // alpha 
      }
  </code></pre>
  <p>Then I have shown this GRBA values to canvas using the following code .</p>
  <pre><code>var ctx = fingerFrame.getContext('2d');
  var imgData = ctx.createImageData(fingerFrame.width, fingerFrame.height);
  ctx.putImageData(imgData, 0, 0, 0, 0, fingerFrame.width, fingerFrame.height);
  </code></pre>
  <p>After that from canvas I used to image in image tag using the following code:</p>
  <pre><code> const img = document.getElementById('i');  
   img.src = fingerFrame.toDataURL(); 
  </code></pre>
  <p>But I do not want to use canvas. I want to show image in image tag from Uint8Array directly. How can I do that? Any help will be highly appreciated.</p>