string filename = FileUpload1.FileName;
this.FileUpload1.SaveAs(Server.MapPath("~/") + "images/" + filename);
//this.Image2.ImageUrl = filename;
//Response.Write(Server.MapPath("~/") + filename);
//把上传的图片改造成水印效果
System.Drawing.Image img = Bitmap.FromFile(Server.MapPath("~/") + "images/" + filename);
Graphics g = Graphics.FromImage(img);
Font font = new Font("宋体", 44, FontStyle.Italic);
g.DrawString("I LOVE YOU ", font, Brushes.Gray , 10, 20);
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
this.Response.BinaryWrite(ms.ToArray());
this.Response.Flush();