public static void Run()
{
// ExStart:PreprocesImagesFromOCROperation
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_OCR() + "Sampleocr.bmp";
// Initialize an instance of OcrEngine.
OcrEngine ocr = new OcrEngine();
// Set the Image property by loading the image from file path location.
ocr.Image = ImageStream.FromFile(dataDir);
// Set the SavePreprocessedImages property to false.
ocr.Config.SavePreprocessedImages = true;
if (ocr.Process())
{
// Do processing
}
// ExEnd:PreprocesImagesFromOCROperation
}
}