title: From PNG to BitmapImage. Transparency issue.
body: <p>I've got some issue. 
  I'm trying to load png-image from resources to BitmapImage propery in my viewModel like this:</p>
  
  <pre><code>Bitmap bmp = Resource1.ResourceManager.GetObject(String.Format("_{0}",i)) as Bitmap;
  MemoryStream ms = new MemoryStream();
  bmp.Save(ms, ImageFormat.Bmp);
  BitmapImage bImg = new BitmapImage();
  
  bImg.BeginInit();
  bImg.StreamSource = new MemoryStream(ms.ToArray());
  bImg.EndInit();
  
  this.Image = bImg;
  </code></pre>
  
  <p>But when I do it, I lose the transparency of the image.
  So the question is how can I load png image from resources without loss of transparency?
  Thanks,
  Pavel.</p>