Asp.net 绘图“参数无效”的错误
摘要
public void ProcessRequest(HttpContext context) | |
{ | |
Bitmap nbitmap = new Bitmap(1000, 1000); | |
Graphics g = Graphics.FromImage(nbitmap); | |
Font font = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Italic); | |
Brush brush = Brushes.Black; | |
g.DrawString("测试字符串", font, brush, 10, 10);/////运行到这句报参数无效 | |
g.Dispose(); | |
font.Dispose(); | |
brush.Dispose(); | |
nbitmap.Save(context.Server.MapPath("~/upload/cert" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".jpg")); | |
nbitmap.Dispose(); | |
} |
评论(0)