Ejemplo n.º 1
0
 public string  DecodeQrImage(string fileName)
 {
     System.Drawing.Image img = System.Drawing.Image.FromFile(fileName);
     Bitmap bmap = new Bitmap(img);
     LuminanceSource source = new RGBLuminanceSource(bmap, bmap.Width, bmap.Height);
     BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
     Result result = new MultiFormatReader().Decode(bitmap);
     return result.Text;
 }
Ejemplo n.º 2
0
        public string  DecodeQrImage(string fileName)
        {
            System.Drawing.Image img = System.Drawing.Image.FromFile(fileName);
            Bitmap          bmap     = new Bitmap(img);
            LuminanceSource source   = new RGBLuminanceSource(bmap, bmap.Width, bmap.Height);
            BinaryBitmap    bitmap   = new BinaryBitmap(new HybridBinarizer(source));
            Result          result   = new MultiFormatReader().Decode(bitmap);

            return(result.Text);
        }