Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

png to bmp in C#

Tags:

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.

like image 838
Shuttleu Avatar asked Jun 29 '09 20:06

Shuttleu


People also ask

How do I create a BMP file in C++?

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.


1 Answers

Image Dummy = Image.FromFile("image.png"); Dummy.Save("image.bmp", ImageFormat.Bmp); 
like image 177
arbiter Avatar answered Sep 25 '22 04:09

arbiter