converts a sprite to animated gif