Bitmap Image to 1Bpp image

May 7, 2015 at 4:55 AM
I want to convert Bitmap image to 1Bpp format
Coordinator
May 7, 2015 at 7:20 AM
What is the type of the output format that you want? Do I understand you correctly that you want a monochrome image? With 1 bit per pixel.
May 7, 2015 at 8:31 AM
Edited May 7, 2015 at 1:06 PM
yes, i want to convert bitmap to 1bpp image (color to only black and white image).

thank you for your reply, i am waiting for your answer.
Coordinator
May 7, 2015 at 3:43 PM
You can use the Threshold or the Quantize method of MagickImage for this.
May 8, 2015 at 5:43 AM
Can you please share your code...., because i am not getting exact what i want.
Coordinator
May 8, 2015 at 9:46 AM
Edited May 8, 2015 at 9:47 AM
I don't know what you want exactly but here are some examples (I forgot about setting ColorType to BiLevel earlier):
using (MagickImage image = new MagickImage("logo:"))
{
    image.Threshold(50);
    image.Depth = 1;
    image.Write(@"C:\logo-1.png");
}

using (MagickImage image = new MagickImage("logo:"))
{
    image.ColorType = ColorType.Bilevel;
    image.Depth = 1;
    image.Write(@"C:\logo-2.png");
}

using (MagickImage image = new MagickImage("logo:"))
{
    QuantizeSettings settings = new QuantizeSettings();
    settings.ColorSpace = ColorSpace.GRAY;
    settings.Colors = 2;

    image.Quantize(settings);
    image.Depth = 1;
    image.Write(@"C:\logo-3.png");
}
You might want to add some links to images that explain what kind of result you want if the result from these examples are incorrect.
May 8, 2015 at 11:24 AM
thank you so much for your reply, its working.