Animated JPEG

Add support for AJPEG via Javascript

Animated JPEG is not supported in any popular browser. This situation can be changed by adding a small javascript library which parses .ajpeg files and displays them as intended.

This library looks for image-tags on load, in case the referenced image has the .ajpeg suffix, the file in the src attribute is then downloaded via XMLHttpRequest, parsed and the contained frames are then drawn in-place.

How to try this example

Change into the directory where this file here resides. Fire up a simple webserver, for example:

python -m SimpleHTTPServer

and open example.html.