title: Saving image to file
body: <p>I am working on a basic drawing application. I want the user to be able to save the contents of the image.</p>
  
  <p><img src="https://i.stack.imgur.com/M20lJ.png" alt="enter image description here"></p>
  
  <p>I thought I should use </p>
  
  <pre><code>System.Drawing.Drawing2D.GraphicsState img = drawRegion.CreateGraphics().Save();
  </code></pre>
  
  <p>but this does not help me for saving to file.</p>