问题描述
我使用网络摄像头获取位图图像并生成二维码。然后将其传入“QRLiveBox”的图片框。
Result result = barcodeReader.Decode(new Bitmap(QRLiveBox.Image as Bitmap));
if (QRLiveBox.Image != null)
{
BarcodeReader barcodeReader = new BarcodeReader();
//Result result = barcodeReader.Decode((Bitmap)QRLiveBox.Image);
Result result = barcodeReader.Decode(new Bitmap(QRLiveBox.Image as Bitmap));
if (result != null)
{
string qrResult = result.ToString();
txtDecodedQRCode.Text = qrResult;
//captureDevice.Stop();
}
}
你们认为问题或解决方案。以及如何编码。
- 两个线程是否不能同时访问位图?
- 是不是接口有问题?
- 如何在不使用 Control.Invoke 的情况下访问任何控件?
我在这里找到了线索:
- Best Way to Invoke Any Cross-Threaded Code?
- InvalidOperationException - object is currently in use elsewhere
但我不知道如何在我的项目中实现它。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)