Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++: What's the simplest way to read and write BMP files using C++ on Windows?

I would like to load a BMP file, do some operations on it in memory, and output a new BMP file using C++ on Windows (Win32 native). I am aware of ImageMagick and it's C++ binding Magick++, but I think it's an overkill for this project since I am currently not interested in other file formats or platforms.

What would be the simplest way in terms of code setup to read and write BMP files? The answer may be "just use Magick++, it's the simplest."

Related Question: What is the best image manipulation library?

like image 496
Eugene Yokota Avatar asked Oct 13 '08 23:10

Eugene Yokota


People also ask

Can Windows read BMP files?

If you use a PC or Mac, start by opening the folder with the BMP file you want to use. Right-click on the file name and then hover over the Open With option. You can then choose from any number of applications to display your BMP file. These may include Adobe Photoshop, Windows Photos, Apple Photos, and more.

What is a C BMP file?

The BMP file format, also known as bitmap image file, device independent bitmap (DIB) file format and bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems.


1 Answers

When developing just for Windows I usually just use the ATL CImage class

like image 102
Gerald Avatar answered Oct 10 '22 14:10

Gerald