png to bmp in C#

后端 未结 3 1157
旧时难觅i
旧时难觅i 2020-12-07 00:18

is there anyway that I can convert a png to a bmp in C#?

I want to download a image then convert it to a bmp then set it as the desktop background.

I have th

3条回答
  •  生来不讨喜
    2020-12-07 01:20

    Certainly. You'd want to load up a Bitmap object with your png:

    Bitmap myBitmap = new Bitmap("mypng.png");
    

    Then save it:

    myBitmap.Save("mybmp.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
    

提交回复
热议问题