如何制作png无背景的水印呢?文字背景总是有黑线
我想做个水印的功能WEB实现,但是我最终形成的文字在13号以上的话都会有黑色的边线。请各位指教一下?System.Drawing.Color changeColor = System.Drawing.ColorTranslator.FromHtml(c1.Value);
Bitmap bitmap = new Bitmap(400, 150);
Graphics g = Graphics.FromImage(bitmap);
g.Clear(Color.Transparent);
Brush brush = new SolidBrush(changeColor);
g.DrawString(Text1.Value, new Font("宋体", Convert.ToInt32(TextBox2.Text)), brush, new PointF(20, 20));
// #FFFF81
g.SmoothingMode = SmoothingMode.AntiAlias;
string path = "TextImages/" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
bitmap.Save(Server.MapPath("~/") + path, ImageFormat.Png);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
水印 背景无法透明 --------------------编程问答-------------------- 一般我都是网上找的。还没制作过 --------------------编程问答-------------------- 我这也是,但是生成出来之后的图片文字会有黑线。不知道为什么,一放大文字就有这个线。但是小一点的文字就没有这种情况。
补充:.NET技术 , ASP.NET