public class ImzaliResim : IHttpHandler
{
public bool IsReusable {
get {return
true;}}
public void ProcessRequest(HttpContext context)
{
// hangi resim talep ediliyor?
string resimAdi = context.Request["name"];
// bu resmi okuyalım
Bitmap bmp = Image.FromFile(fileName);
// üzerine imzamızı atmak için Graphics'i elde edelim
Graphics g = Graphics.FromImage(bmp);
// imzamızı atalım
g.DrawString("(c) Bilişim Kulübü", new Font("Verdana", 11f), Brushes.Red, new PointF(10, 10));
// ve resmi çıktıya yazalım
bmp.Save(context.Response.OutputStream, ImageFormat.Jpeg);
}
}