public static void Run()
{
// ExStart:DitheringRasterImages
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
// Create an instance of JpegImage and load an image as of JpegImage
using (var image = (JpegImage)Image.Load(dataDir + "aspose-logo.jpg"))
{
// Peform Floyd Steinberg dithering on the current image and Save the resultant image
image.Dither(DitheringMethod.ThresholdDithering, 4);
image.Save(dataDir + "SampleImage_out.bmp");
}
// ExEnd:DitheringRasterImages
}
}