public static void Run()
{
// ExStart:ApplyingMotionWienerFilter
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();
// Load the image
using (Image image = Image.Load(dataDir + "asposelogo.gif"))
{
// Caste the image into RasterImage
RasterImage rasterImage = image as RasterImage;
if (rasterImage == null)
{
return;
}
// Create an instance of MotionWienerFilterOptions class and set the length, smooth value and angle.
MotionWienerFilterOptions options = new MotionWienerFilterOptions(50, 9, 90);
options.Grayscale = true;
// Apply MedianFilterOptions filter to RasterImage object and Save the resultant image
rasterImage.Filter(image.Bounds, options);
image.Save(dataDir + "ApplyingMotionWienerFilter_out.gif");
}
// ExEnd:ApplyingMotionWienerFilter
}
}