title: Draw image from pixel array on canvas with putImageData
body: <p>I am working on a project that can encrypt an image and redraw the decrypted image on canvas. As I am still pretty new to coding and programming, I am currently having issues redrawing the decrypted image data, which is a pixel array in the form R,G,B,A. I thought this would be possible by simply putting the data into</p>
  
  <pre><code>ctx.putImageData(imgd,0,0);
  </code></pre>
  
  <p>But firebug tells me that the value does not implement the interface for imagedata. I have posted the entire array <a href="http://pastebin.com/KDZrXzbU" rel="noreferrer">here</a>. The image is 160px wide and 120px high.</p>
  
  <p>Is there any way to reformat the array so that it is drawable on the canvas?</p>