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