← Back

Display JPEG images using the <img> tag

This demo decodes a baseline JPEG (.jpg) file with a dedicated WebAssembly JPEG decoder and re-encodes the result to PNG for canvas display, chaining two filters (libjpeg_1 then libpng_1) in a single with attribute.

Code snippet

<img is="universal-img_1" src="Freedom.jpg" using="solver_minimal_1"
     with="libpng_1;libjpeg_1"> </img>

Specifications :

The specifications of the test sequence are :

Format JPEG
FileSize 151 Ko
Solver solver_minimal_1