Bitmap bt1 = new Bitmap(300,350,PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(bt1);
g.TextRenderingHint = TextRenderingHint.AntiAlias; //关键是这一句
g.DrawString("你好吗",font,new SolidBrush(Color.White),10,10);
//g.Clear(Color.White);
bt1.Save("11212.jpg",ImageFormat.Jpeg);
本文介绍了一种在ASP.NET中使用Bitmap和Graphics类消除文本锯齿的方法,通过设置TextRenderingHint属性为AntiAlias,可以显著提高文本的显示质量。
1939

被折叠的 条评论
为什么被折叠?



