jsgif
Save a HTML5 Canvas to GIF and Animations
...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.