jsgif
Save a HTML5 Canvas to GIF and Animations
...It is a JavaScript port of the GIFEncoder portion of the earlier as3gif project. Developers can feed the encoder an HTML canvas context or raw image-data-style pixel arrays. Animated output can be configured with custom frame delays and repeat counts. Encoded data can be converted to Base64 for inline display, transferred to a server, or saved directly as a GIF file. The implementation includes GIF encoding, LZW compression, NeuQuant color quantization, and helper utilities needed to generate GIFs entirely on the client side.