Sunday, February 11, 2007

A tool for converting animated GIFS to spritemaps

I'm having a lot of fun playing around with the XNA development kit. One day I'll get around to learning 3D but for now I'm still having too much fun with sprites! I wanted a tool that took an animated GIF and produced a spritesheet (a bitmap with each frame of the GIF).

From this:

... to this:

I couldn't find a tool forthis (although I'm sure they exist), so I did my own and uploaded it to my tools page

9 comments:

Anonymous said...

I hope you own the copyright to that image.

Anonymous said...

Do you know how I could make it so the exported spritemap preserves the Alpha channel of the animated gif?

I'm importing several large rendered 3D animations (gifs), and I want to create a sprite sheet, but the 1 bit alpha transparancy is very important... any ideas, or does it do this already?

Steve Dunn said...

As far as I know the alpha channel is preserved from the GIF. I'd suggest giving it a go and see what happens. If there's anything I can do to help, please feel free to post me the GIFS and I'll take a look.
Cheers,
Steve.

rynhughes said...

This is great! And thank you for posting the source. I'm just getting started with XNA and .Net graphics in general so this will be a very valuable learning resource in addition to an awesome tool.

Echilon said...

Cheers, saved me lots of messing round in photoshop.

Illya said...

The programs great and all but it seems to have limitations. I was trying to use it on several gifs and it did not work on a gif that had 56 frames, works fine on a gif with 39 frames. I was wondering if there was a way to change the code so it would accept more frames.

Steve Dunn said...

Hi Illya. Please send me the file and I'll take a look.
Cheers,
Steve

ajay said...

Er zijn veel animatiefilms over de jaren en dit is niet Te verwarren met de Meer gebruikte stop animatie. Model animatie is een vorm van de stop-motion animatie, maar het is ontworpen Om Te fuseren aan bij de live Gifs action beelden Om een illusie van een echte wereld volgorde te maken. Dus wat zijn de beste die ooit gemaakt

Ping said...

Getting some strange results from this tool - it'll be great to save time exporting from flash to photoshop but currently it seems to only want to export moving elements from the original gif to the sprite-sheet. Probably something wrong with my source gif, will investigate.