+5  A: 

You can try ImageMagick:

convert input.gif -transparent white output.gif

For more advanced features you should try something like image masking or do it manually using any image library, setting the pixel values to something with a high alpha value.

See also this thread: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10665

using gif will create jagged edges, however using imagmajick is a good answer nonetheless, just use PNG output though and allow a bit of anti-aliasing at the edge colors.
SpliFF
Also, ImageMagick has bindings for nearly every language, so you can use the ImageMagick library from within C
rascher