Пример #1
0
        public static void ReadPhotograpths()
        {
            // All BarcodeResult.Read methods provide the developer with control to correct image and photograph correction and straightening rotation and perspective from skewed images
            // * RotationCorrection   e.g BarcodeReader.BarcodeRotationCorrection.Extreme  un-rotates and removes perspective from barcode images.
            // * ImageCorrection      e.g BarcodeReader.BarcodeImageCorrection.DeepCleanPixels  separates Barcodes from background imagery and digital noise.
            // * BarcodeEncoding      e.g. BarcodeEncoding.Code128  Setting a specific Barcode format improves speed and reduces the risk of false positive results

            // Example with a photo image
            var PhotoResult = BarcodeReader.ReadASingleBarcode("Photo.jpg", BarcodeEncoding.Code128, BarcodeReader.BarcodeRotationCorrection.Low, BarcodeReader.BarcodeImageCorrection.None);

            string Value = PhotoResult.Value;

            System.Drawing.Bitmap Img         = PhotoResult.BarcodeImage;
            BarcodeEncoding       BarcodeType = PhotoResult.BarcodeType;

            byte[] Binary = PhotoResult.BinaryValue;
            Console.WriteLine(PhotoResult.Value);
        }