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 the downloading bit and the background bit done.
I just need to convert the png to a bmp.
Here is the code for writing the image to disk: 1 struct BMP { 2 // ... 3 4 void write(const char *fname) { 5 std::ofstream of{ fname, std::ios_base::binary }; 6 if (of) { 7 if (bmp_info_header. bit_count == 32) { 8 write_headers_and_data(of); 9 } 10 else if (bmp_info_header.
Image Dummy = Image.FromFile("image.png"); Dummy.Save("image.bmp", ImageFormat.Bmp);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With