usingSystem.IO;
usingSystem.Web;
usingSystem.Web.Caching;
publicclassSimpleImageHandler:IHttpHandler{
publicvoidProcessRequest(HttpContextcontext)
{
//Loadimage.
Bitmapbmap=newBitmap(@"C:\Temp\TEST.JPG");
//Youcoulddosomethinghere,e.g.addsometextstoimage.
//Sendbackimage.
context.Response.ContentType="image/jpeg";
context.Response.BufferOutput=false;
bmap.Save(context.Response.OutputStream,ImageFormat.Jpeg);
}
publicboolIsReusable
{
get
{
returnfalse;
}
}
}