public static void Run()
{
try
{
Stopwatch watch = new Stopwatch();
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_ManageAndOptimizeBarcodeRecognition();
using (BarCodeReader reader = new BarCodeReader(dataDir + "SymbologyTypebarcode.png", DecodeType.Code128))
{
// Start Stopwatch and Set RecognitionMode, ManualHints
watch.Start();
reader.RecognitionMode = RecognitionMode.ManualHints;
reader.ManualHints = ManualHint.MedianSmoothing;
while (reader.Read())
{
Console.WriteLine(reader.GetCodeType() + ": " + reader.GetCodeText());
}
// End Stopwatch
watch.Stop();
Console.WriteLine("Time: " + watch.ElapsedMilliseconds + "ms.");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message + "\nThis example will only work if you apply a valid Aspose BarCode License. You can purchase full license or get 30 day temporary license from http://wwww.aspose.com/purchase/default.aspx.");
}
}
}