Convert .png to .gif
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi I got an .png Image and want to convert it in an .gif file. When i try to show the .png file in an img tag the backround color of the image is grey. I heard Inetrnet Explorer can't show transparent .png files. So i want to convert it in an .gif file. But after that the background of my .gif file is black..
String gifFilePath2 = System.IO.Path.Combine(path, fileName + "_scaled.png"); String gifFilePath3 = System.IO.Path.Combine(path, fileName + "_scaled.gif"); System.Drawing.Image imgGIF = System.Drawing.Image.FromFile(gifFilePath2); Bitmap bmpGIF = new Bitmap(imgGIF, size); bmpGIF.Save(gifFilePath3, System.Drawing.Imaging.ImageFormat.Gif);