Aspose.BarCode.Examples.CSharp.ManageAndOptimizeBarCodeRecognition.DetectDotPeenDatamatrix.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            try
            {                                         
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_ManageAndOptimizeBarcodeRecognition();

                // Initialize the BarCodeReader class by passing barcode file name and barcode type as parameters
                using (BarCodeReader reader = new BarCodeReader(dataDir + "testDotPeen.png", DecodeType.DataMatrix))
                {
                    // Set the reader recognition mode, Manual Hint property to speed up recognition process.
                    reader.RecognitionMode = RecognitionMode.ManualHints;
                    reader.ManualHints = ManualHint.SpecialFormOfCells;
                    while (reader.Read())
                    {
                        Console.WriteLine(reader.GetCodeType() + ": " + reader.GetCodeText());
                    }
                }
            }
            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.");
            }
        }
    }
DetectDotPeenDatamatrix