title: How to save graphics created on a PictureBox?
body: <p>In c# and Visual Studio Windows forms I have loaded an image into a picture box (pictureBox2) and then cropped it and show in another picture box (pictureBox3).</p>
  
  <p>Now I want to save what is inside pictureBox3 as an image file. </p>
  
  <p>How can I do this? </p>
  
  <pre><code>private void crop_bttn_Click(object sender, EventArgs e)
  {
      Image crop = GetCopyImage("grayScale.jpg");
      pictureBox2.Image = crop;
  
      Bitmap sourceBitmap = new Bitmap(pictureBox2.Image, 
                                       pictureBox2.Width, pictureBox2.Height);
      Graphics g = pictureBox3.CreateGraphics();
  
      g.DrawImage(sourceBitmap, new Rectangle(0, 0, 
                  pictureBox3.Width, pictureBox3.Height), rectCropArea, GraphicsUnit.Pixel);
      sourceBitmap.Dispose();
  }
  </code></pre>