You can find a nice release of the ASP.NET team for dynamically generated images for web applications on the Codeplex website. Others have already blogged about this, such as Scott Hanselman and David Hayden, so I’m not going to repeat that. I do want to add some information to this though.
It’s a “Did you know that…” trivia fact. This will get the attention of everybody on the parties that I happen to visit. It might do the same for you. Here goes: did you know that up until .NET Framework version 2.0.40301 (Alpha release of March 2004) there was an entire System.Web.UI.Imaging namespace dedicated to generating images?
In fact, there was even more. The System.Web.Handlers namespace contained a handler DynamicContentHandler and there was a DynamicImage control to go with the handler that had the following options:
- Specify the image as an System.Drawing.Image, Byte or filename.
- Separate scaling for both desktop and mobile browsers.
- Store the generated image in cache or on disk.
- Retrieve parameters from the querystring or the storage format (from the bullet above)
Look at the content of the now released Microsoft.Web.GeneratedImage.dll assembly and tell me if you find similar things. Mind you, the new implementation is definitely what should/could have been built in ASP.NET 2.0: it’s all 2.0-ish now, databinding and generics and stuff. You know, the good things.