title: A generic error occurred in GDI+ when savin image in stream
body: <p>Here is the thing I try to achieve:</p>
  
  <ul>
  <li>Upload png image to server </li>
  <li>Save it;</li>
  <li>Load the saved image, generate thumbnail;</li>
  <li>Save it in different location;</li>
  </ul>
  
  <p>Everything is fine until I have to save the thumbnail. At first I thought that it is the folder permissions or something, so to verify I tried to save it in a <code>MemmoryStream</code> and again I get this "generic GDI+ error", no InnerException or some descriptive StackTrace.
  I was thinking that there is something to do with disposing the original Bitmap but still the same. Here is the code:</p>
  
  <pre><code>postedFile.SaveAs(fullFilePath);
  FileStream fs = new FileStream(fullFilePath, FileMode.Open);
  Image image = Bitmap.FromStream(fs);
  
  Image thumb = image.GetThumbnailImage(thumbsWidth, thumbsHeight, AbortThumbnailPicture, IntPtr.Zero);
  image.Dispose();
  fs.Dispose();
  using (MemoryStream ms = new MemoryStream())
  {
      thumb.Save(ms, ImageFormat.Png); //*** HERE THROWS THE EXCEPTION ***
  
      using (FileStream fstream = new FileStream(fullThumbsPath, FileMode.Create, FileAccess.Write))
      {
          ms.WriteTo(fstream);
          fstream.Close();
      }
      ms.Close();
  }
  
  // The GetThumbnailImage callback
  private bool AbortThumbnailPicture()
  {
      return true;
  }
  </code></pre>
  
  <p>I don't know what else to do please help.</p>