title: Save bitmap to any format
body: <p>I'm kind of confused as to the way C# saves bitmaps. I currently use this statement to save a bitmap to (virtually) any extension (.ico, .dds, etc.).</p>
  
  <pre><code>Bitmap.Save(FileName);
  </code></pre>
  
  <p>This actually works for any extension I choose, but I'm having doubts it's saving in correct format. Reason for said doubts is because I found another article here, 
  <a href="https://stackoverflow.com/questions/4042488/how-to-save-bitmap-as-icon">How to save Bitmap as icon?</a>, which does so like:</p>
  
  <pre><code>// Create a Bitmap object from an image file.
  Bitmap bmp = new Bitmap(sFn);
  
  // Get an Hicon for myBitmap. 
  IntPtr Hicon = bmp.GetHicon();
  
  // Create a new icon from the handle. 
   Icon newIcon = Icon.FromHandle(Hicon);
  
  //Write Icon to File Stream
  System.IO.FileStream fs = new System.IO.FileStream(destFileName, System.IO.FileMode.OpenOrCreate);
  newIcon.Save(fs);
  </code></pre>
  
  <p>Which is obviously way different. So two questions:</p>
  
  <ol>
  <li>How can/does the first approach work if the second is the "correct" way?</li>
  <li>Would I need to customize save properties for each individual extension I wish to support or is the first method sufficient for any extension?</li>
  </ol>