Homepage » Software, Web Development » ASP.NET Image Resize HttpHandler

ASP.NET Image Resize HttpHandler

By Jonathan + October 27th, 2005

I heart going home after a day of ASP programming at work to my beautiful PHP language, with it’s lovely GD Image library…*starts making out with his screen*

Where was I going with this…Oh yes, there are so many excellect PHP automatic thumbnail generators out there that I use all the time, it always bugged me that all the ASP.NET thumbnail programs are all commercial. Well, a friend of mine whipped up this great HttpHandler that even handles the caching. Very nicely done!…though I can’t run it at home in Linux :D

blog-j - ASP.NET Image Resize Handler

The Url rewrite pattern is as follows: http://your.server.com/[path/to/image.ext]/[width]/[height]/[new format]/Image.ashx (where Image.ashx is whatever you have set as the path in your Web.config entry. When the handler is called, it first checks to see if an image has already been resized at the requested dimensions/format for the requested image, and creates it if necessary.

O comments at "ASP.NET Image Resize HttpHandler"

Be the first commenter!

Comment Now!

Name* Email* Blog / Website

Latest Posts

C#: Returning an array via webservice with derived classes November 20th, 2008

C#: Returning an array via webservice with derived classes

Here’s a neat little thing I learned today. I was writing a WebMethod for a WebService I’m working on for ScribbleLive. The return type[...] Read the rest »