javascriptimagecanvaspixeldata-url

Draw image from pixel data arrays


If I have an array of pixel data in JavaScript, is there a good way to display it on an HTML page?

I doubt any exist, but does anyone know of image libraries for JavaScript that can generate image in a standard format? Is there a way to replicate the functionality of a data: URI in IE 7?


Solution

  • Does PNG format work for your targets? If so PNGlib looks pretty good.

    Also, JS JPEG Encoder looks good but it takes as input the returned value of Canvas.getImageData().

    Don't know what you can do to support IE 7 though.