给图片添加文字


Bitmap bmp = new Bitmap(filename);
Graphics g = Graphics.FromImage(bmp);
String str = "hello, string";
Font font = new Font("宋体", 8);
SolidBrush sbrush = new SolidBrush(Color.Black);
g.DrawString(str, font, sbrush, new PointF(10, 10));
MemoryStream ms = new MemoryStream();
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);


你可能感兴趣的:(给图片添加文字)