[CSHARP] OpenFileDialog OFD = new OpenFileDialog();
string fileloc = OFD.FileName;
//load image to picturebox
pictureBox1.Image = Image.FromFile(fileloc);
if (pictureBox1.Image != null)
// Create image.
Image tmp = pictureBox1.Image;
// Create graphics object for alteration.
Graphics g = Graphics.FromImage(tmp);
// Create string to draw.
String wmString = "SOFTAFZAR.NET";
// Create font and brush.
Font wmFont = new Font("Trebuchet MS", 40);
SolidBrush wmBrush = new SolidBrush(Color.Blue);
// Create point for upper-left corner of drawing.
PointF wmPoint = new PointF(10.0F, 10.0F);
// Draw string to image.
g.DrawString(wmString, wmFont, wmBrush, wmPoint);
//Load the new image to picturebox
pictureBox1.Image = tmp;
// Release graphics object.