代码如下:
Bitmap Image=new Bitmap(600,400);
Graphics myGraphics=Graphics.FromImage(Image);
int width=480,height=160;
myGraphics.FillEllipse(new SolidBrush(Color.White), 50, 50, width, height);
myGraphics.FillEllipse(new SolidBrush(Color.LightBlue), 50, 50, width - 30, height - 30);
string textOut = "ASP.NET";
Font fontOut = new Font("Times New Roman", 16, FontStyle.Bold|FontStyle.Italic);
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Center;
stringFormat.LineAlignment = StringAlignment.Center;
myGraphics.DrawString(textOut,fontOut,new SolidBrush(Color.Black),new Rectangle(50,50,width,height),stringFormat);
Image.Save(Response.OutputStream, ImageFormat.Jpeg);
该段代码能在页面中绘制出图像来,现在请问各位大侠:
如何让该图像以excel的格式嵌入到网页中呢?