title: A generic error occurred in GDI+
body: <p>I loaded an image into a Picture Box using:</p>
  
  <pre><code>picturebox1.Image = Image.FromFile()
  </code></pre>
  
  <p>and I save it by using:</p>
  
  <pre><code>Bitmap bm = new Bitmap(pictureBox1.Image);
  bm.Save(FileName, ImageFormat.Bmp);
  </code></pre>
  
  <p>It works perfectly fine when creating a new file, but when I try to replace the existing image, I get thrown the following runtime error: </p>
  
  <blockquote>
    <p>A generic error occurred in GDI+</p>
  </blockquote>
  
  <p>So what can I do to solve this problem?? </p>