nietsme

记录点滴
[C#] 在图片上添加文字

 

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);

 

 

 

posted on 2010-05-24 23:33  nietsme  阅读(15278)  评论(1)    收藏  举报