A javascript library would be extremely useful.
I was thinking of extracting the gif parsing code from this project: https://github.com/shachaf/jsgif
Then I looked at the code. I've never seen such callback hell in js without there being a server... so I abandoned that idea and was eventually planning on writing my own.