title: Image.Save crashing: {"Value cannot be null.\r\nParameter name: encoder"}
body: <p>I am trying to save an image into a <code>MemoryStream</code> but it is failing under certain conditions.</p>
  
  <p>Here is the code:</p>
  
  <p>The following code succeeds:</p>
  
  <pre><code>Image img = Bitmap.FromStream(fileStream);
  MemoryStream ms = new MemoryStream();
  img.Save(ms, img.RawFormat);  // This succeeds.
  </code></pre>
  
  <p>The following code fails:</p>
  
  <pre><code>Image img = Bitmap.FromStream(fileStream);
  Image thumb = img.GetThumbnailImage(thumbWidth, thumbHeight, null, System.IntPtr.Zero);
  
  MemoryStream ms = new MemoryStream();
  thumb.Save(ms, thumb.RawFormat);  // This fails.
  </code></pre>
  
  <p>Notice that the second snippet is using an image created using <code>Image.GetThumbnailImage</code>.</p>
  
  <p>What is the difference?  Does anyone have any idea why is it failing?</p>