title: Is it possible to draw an Uint8ClampedArray directly to a canvas?
body: <p>In JavaScript, you can manipulate pixels of an image directly using an <code>Uint8ClampedArray</code>. Before rendering that image to a canvas, you have to:</p>
  
  <ol>
  <li><p>Create an <code>ImageData</code> object.</p></li>
  <li><p>Render the <code>Uint8ClampedArray</code> to an <code>ImageData</code> object with <code>ImageData.data.set</code>.</p></li>
  <li><p>Draw that <code>ImageData</code> object to the canvas with <code>context.putImageData</code>.</p></li>
  </ol>
  
  <p>So, from having an <code>Uint8ClampedArray</code> with your image, to actually seeing it on screen, it takes no less than 3 O(N) copying operations. For big images, that can be very detrimental. One solution would be to cache the ImageData object, and replace the pointer <code>imageData.data</code> to your <code>Uint8ClampedArray</code> - but <code>imageData.data</code> is readonly! Is there any way to do this more efficiently?</p>