Extracting single frames from an animated GIF to canvas

Omiod picture Omiod · Jan 10, 2011 · Viewed 11.7k times · Source

I need to load all the frames of an animated GIF to an HTML5 canvas.

Please note, I don't want to "play" the animated (someone asked this before), all I want is to extract all the frames to use them as single images.

Answer

Brendan picture Brendan · Jul 2, 2013

Buzzfeed have librarified the code from the repo tommitytom posted. I haven't tried it yet but it looks good.

https://github.com/buzzfeed/libgif-js