使用zxing.net组件,读取BitmapSource中的二维码。简单使用方法如下:

        private void DecodeQrCode()
        {
            if (QrCodeSource.CanFreeze)
            {
                QrCodeSource.Freeze();
            }
            using (var bitmap = BitmapSourceToBitmap(QrCodeSource))
            {
                var source = new BitmapLuminanceSource(bitmap);
                var bBitmap = new BinaryBitmap(new HybridBinarizer(source));
                var result = new MultiFormatReader().decode(bBitmap);
                ResultValue = result?.Text;
            }
        }
读取

相关文章:

  • 2021-11-29
  • 2022-01-07
  • 2021-12-10
  • 2022-12-23
  • 2021-11-26
  • 2022-01-07
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-12-10
  • 2022-12-23
  • 2021-07-12
  • 2021-11-29
  • 2022-12-23
相关资源
相似解决方案