Exemple #1
0
        public string GetBarcodeFromFile(string codeType, string filename)
        {
            BarcodeFormat format = CodeReader.FormatFromString(codeType);
            CodeReader    Reader = new CodeReader(format);

            Bitmap barcodeBitmap = (Bitmap)Image.FromFile(filename, true);
            Result result        = Reader.ReadCode(barcodeBitmap);

            barcodeBitmap.Dispose();

            return(result.ToString());
        }