JPEG 2000 on the Web

This is a demo of decoding JPEG 2000 images entirely in JavaScript. It uses OpenJPEG, an open source library for JPEG 2000 images, which was compiled to JavaScript using Emscripten.

After the image is decoded into pixel data, it is rendered using a Canvas element. This demo should therefore work in any web browser that supports the Canvas element, whether or not that web browser natively supports the JPEG 2000 format.

Click 'Go!' to render a demo image (from here) which has been encoded into a JSON object. You can also change the URL to that of a binary JPEG 2000 image, which will be downloaded and rendered, but I am not aware of a cross-browser way to receive binary data, so it uses a typed array property of XHRs (which will only work on Firefox 4).



JPEG 2000 URL: