The IsMonochrome is only used when an image is read by some of the image decoders. This will be moved to MagickReadSettings in the next release.
The BMP encoder will only write a 1 bit image if contains 2 colors and has a color palette. Below is an example that can help you accomplish this.
The BMP encoder will only write a 1 bit image if contains 2 colors and has a color palette. Below is an example that can help you accomplish this.
using (MagickImage image = new MagickImage("logo:")) { // First reduce the colors image.ColorType = ColorType.Bilevel; // Or use Quantize/* image.Quantize(new QuantizeSettings() { Colors = 2 }); */// Tell image to use a color map image.ClassType = ClassType.Pseudo; // HACK! For now you will have to add the code below, this will be fixed in the next release image.ChangeColorSpace(ColorSpace.sRGB); // Write 1 bit bmp image.Write(@"C:\logo.bmp"); }