views:

822

answers:

3

Can anyone provide a good example of IHttpHnalder for handling Image Type. I want to resize the image that's hosted on my server

+2  A: 

Problem using iHttpHandler

and

How to know which image has been requested

Both have examples of HTTPHandlers for serving images.

Zhaph - Ben Duguid
A: 

How About. http://blog.jasonnussbaum.com/?p=104

Source is available in the downlaod.

If you are resizing GIF you may also want to look into image quantizing.

Ady
A: 

The answers by Zhaph and Ady seem to point in the right direction already, but if you need an additional example...

My article on BlobStreams for the Microsoft.NET Magazine here in Holland includes a very simple example of serving images from database BLOBs. Can't remember if the example used an IHttpHandler or a simple ASP.NET page, but for the code you need it really doesn't matter that much.

peSHIr