ASP.NET GDI+ 图像问题
编译器错误消息:CS1729:“bitmap”不包含采用“2”参数的构造函数行21:bitmapimage=newbitmap(300,50);protectedvoid...
编译器错误消息: CS1729: “bitmap”不包含采用“2”参数的构造函数
行 21: bitmap image = new bitmap(300,50);
protected void Page_Load(object sender, EventArgs e)
{
bitmap image = new bitmap(300,50);
Graphics g = Graphics.FromImage(image );
g.FillRectangle(Brushes.White ,1,1,298,48);
Font font = new Font("Impact",20, FontStyle.Regular);
g.DrawString("this is my text",font ,Brushes.Blue ,10,5);
image.Save(Response .OutputStream ,System.Drawing.Imaging .ImageFormat.Gif );
g.Dispose();
image.Dispose();
}
private void Save()
{
throw new ApplicationException();
} 展开
行 21: bitmap image = new bitmap(300,50);
protected void Page_Load(object sender, EventArgs e)
{
bitmap image = new bitmap(300,50);
Graphics g = Graphics.FromImage(image );
g.FillRectangle(Brushes.White ,1,1,298,48);
Font font = new Font("Impact",20, FontStyle.Regular);
g.DrawString("this is my text",font ,Brushes.Blue ,10,5);
image.Save(Response .OutputStream ,System.Drawing.Imaging .ImageFormat.Gif );
g.Dispose();
image.Dispose();
}
private void Save()
{
throw new ApplicationException();
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询