title: c# Bitmap.Save transparancy doesn't save in png
body: <p>I'm trying to save a Bitmap class that has transparancy as a png file with transparancy.
  I'm having no luck.</p>
  
  <h2>The bitmap has transparancy, it just doesn't save with transparancy.</h2>
  
  <p>this is what I'm doing</p>
  
  <h2>bitmap setup</h2>
  
  <pre><code>Bitmap ret = new Bitmap(bWidth, bHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
  </code></pre>
  
  <h2>saveing</h2>
  
  <pre><code>ret.Save(filename, ImageFormat.Png);
  </code></pre>
  
  <p>I also tried saving the file with a filestream, and that made no difference.</p>
  
  <p>When the image is in a Picture box the transparancy exists, but when I save i I just get a black background.</p>
  
  <p>I really don't want to use any 3rd party code, they found a way to do it, I'd like to also.</p>
  
  <p>thanks.</p>