Bitmap myBitmap = new Bitmap("C:\\myImage.jpg");
Graphics g = Graphics.FromImage(myBitmap);
StringFormat strFormat = new StringFormat();
strFormat.Alignment = StringAlignment.Center;
strFormat.LineAlignment = StringAlignment.Center;
g.DrawString("My\nText", new Font("Tahoma", 20), Brushes.White,
new RectangleF(0, 0, 500, 500), strFormat);
myBitmap.Save("C:\\myImage1.jpg");
No comments:
Post a Comment