In This Chapter:
It seems as if every Web page has at least one banner that promotes a product or a service. Banners are kind of like the billboards we drive by they've become part of the landscape. And in spite of any annoyance we might feel, they're an effective way to reach consumers. Without any effectiveness, advertisers wouldn't pay to sponsor banners. (Of course, we could talk about that period from 1998 through 2001, during which advertisers paid far more than they should have in the now-famous irrational exuberance about the Internet's potential.)
Almost all the banners that dot the Web page landscape are GIF images, many of them animated. The .NET Framework provides a fantastic array of image creation, manipulation, and saving methodology. I first learned about all this at a summit on the Microsoft campus. The possibility of creating animated GIF banners programmatically really excited me. I asked several of the speakers how to create and save animated GIFs. Their responses were all similar: You can do it, but they didn't know exactly how. Finally, Rob Howard agreed to find the answer and let me know via e-mail. Two weeks, and lots of e-mails from various engineers at Microsoft later, I had an answer. Creating and saving animated GIFs is not possible with the current GIF codec. Bummer!
So I've kept my desire alive ever since. I did some research into the format of animated GIF files and realized there is a way to do it with the .NET classes as a starting point. I wrote a class named AnimagedGif that can be used to save a series of GIF images as a single animation. This chapter talks about this class and how you can easily use it in your applications.