How to generate an Image from ImageData in JavaScript?
None of the previous answers provide an answer to the question as it was presented in the subject – getting an Image from ImageData. So here’s a solution. function imagedata_to_image(imagedata) { var canvas = document.createElement(‘canvas’); var ctx = canvas.getContext(‘2d’); canvas.width = imagedata.width; canvas.height = imagedata.height; ctx.putImageData(imagedata, 0, 0); var image = new Image(); image.src = … Read more