A simple and small header only C++ BMP library
Saturday, November 27, 2021
The BMP file format is a raster graphics image file format. It is a simple image format. Most of the BMP is uncompressed, though some are compressed with simple Run-Length-Encoding.
Here presents a simple and small header only C++ BMP library (https://github.com/yangcha/bmpmini). For grayscale images, most image libraries still encode them as RGB color image which is three times larger than it should be.
This library allows you to save the grayscale images as single channel image, which is a third size of RGB images.
It is a single header only library. To use it, just include it in your code. There is no dependency on external library.
Source code is here: https://github.com/yangcha/bmpmini