BMP libraries for C#
System.Drawing.Bitmap reads and writes BMP, but works only on Windows in .NET 6 and later. Cross-platform options:
- ImageSharp: fully managed, reads every BMP header version including OS/2 and RLE4/RLE8/RLE24, and writes 1, 2, 4, 8, 16, 24 and 32-bit files. Free under Apache 2.0 for open source and companies under $1M revenue, otherwise needs a commercial license.
- Magick.NET: ImageMagick for .NET (Apache 2.0). Writes classic
BMP3files for old software, or V5 headers with alpha.
SkiaSharp decodes BMP files but can’t encode them.
- ImageSharp ImageSharp is a fully managed .NET image library. How to read and write BMP files in C#, choose the bit depth, save 8-bit palette BMP, read BMP header info.
- Magick.NET Magick.NET is the .NET wrapper of ImageMagick. How to read and write BMP files in C#, write BMP3 files for old software, 16-bit and 32-bit BMP.