FileStream fs = new FileStream(Server.MapPath(".") + "/" + "1.jpg", FileMode.Open, FileAccess.Read);
System.Drawing.Bitmap image = new System.Drawing.Bitmap(467, 209, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
System.Drawing.Bitmap image1 = new System.Drawing.Bitmap(fs);
Graphics g = Graphics.FromImage(image);
g.Clear(Color.White);
g.DrawImage(image1, 20, 60, 10, 20);
Font font = new System.Drawing.Font("Arial", 10);
System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Black, Color.Black, 1.2f, true);
g.DrawString("对不起", font, brush, 215, 130);
//g.DrawString(lblCorpName.Text, font, brush, 215, 30);
//g.DrawString(lblCouponTitle.Text, font, brush, 215, 55);
//g.DrawString("开始时间:" + strStartTime, font, brush, 215, 80);
//g.DrawString("结束时间:" + strEndTime, font, brush, 215, 105);
//g.DrawString("地址:" + lblCorpAddress.Text, font, brush, 215, 130);
//g.DrawString("电话:" + lblCorpTelphone.Text, font, brush, 215, 150);
//g.DrawString("优惠券号码:*************", font, brush, 250, 190);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
Response.ClearContent();
Response.ContentType = "image/Jpeg";
Response.BinaryWrite(ms.ToArray());
image.Dispose();
System.Drawing.Bitmap image = new System.Drawing.Bitmap(467, 209, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
System.Drawing.Bitmap image1 = new System.Drawing.Bitmap(fs);
Graphics g = Graphics.FromImage(image);
g.Clear(Color.White);
g.DrawImage(image1, 20, 60, 10, 20);
Font font = new System.Drawing.Font("Arial", 10);
System.Drawing.Drawing2D.LinearGradientBrush brush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Black, Color.Black, 1.2f, true);
g.DrawString("对不起", font, brush, 215, 130);
//g.DrawString(lblCorpName.Text, font, brush, 215, 30);
//g.DrawString(lblCouponTitle.Text, font, brush, 215, 55);
//g.DrawString("开始时间:" + strStartTime, font, brush, 215, 80);
//g.DrawString("结束时间:" + strEndTime, font, brush, 215, 105);
//g.DrawString("地址:" + lblCorpAddress.Text, font, brush, 215, 130);
//g.DrawString("电话:" + lblCorpTelphone.Text, font, brush, 215, 150);
//g.DrawString("优惠券号码:*************", font, brush, 250, 190);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
Response.ClearContent();
Response.ContentType = "image/Jpeg";
Response.BinaryWrite(ms.ToArray());
image.Dispose();