The example converts a 24 bit color image to 1 bit color.
It uses the ConvertColor method to change the color depth of the image loaded into the ImageKit control.
Example Code
Converts a 24-bit image to a 1-bit image with a threshold of 128, creating a palette that fits the image (without using a fixed palette). Dithering is disabled.
[Visual Basic.NET]
ImagKit1.File.FileName = "24bitBMP.bmp"
ImageKit1.File.LoadImageFromFile()
'Convert bitcount
ImageKit1.Effect.ConvertColor(1, False, False, 128)
'Display in scale display
mode
ImageKit1.DisplayMode = Newtone.ImageKit.Win.DisplayMode.Scale
ImageKit1.Display()
[Visual C#.NET]
ImagKit1.File.FileName = "24bitBMP.bmp";
ImageKit1.File.LoadImageFromFile();
//Convert bitcount
ImageKit1.Effect.ConvertColor(1, false, false, 128);
//Display in scale display
mode
ImageKit1.DisplayMode = Newtone.ImageKit.Win.DisplayMode.Scale;
ImageKit1.Display();