使用相机拍照时,使用 Zxing .Net 0.14.0.1 读取二维码不起作用

Reading qr code with Zxing .Net 0.14.0.1 is not working when taking photo with camera

读取通过二维码生成器网站生成并直接下载的二维码时,我可以通过以下代码行读取二维码

 var reader = new BarcodeReader();
 reader.Options.TryHarder = true;
 reader.Options.PossibleFormats = new List<BarcodeFormat>();
 reader.Options.PossibleFormats.Add(BarcodeFormat.QR_CODE);
 var result = reader.Decode(new Bitmap(image));

这适用于以下下载的二维码

但是像下面这样的二维码的相机照片是不行的

即使我裁剪它也不起作用

我已经尝试将其他版本降级为 0.14.0.1 以及来自类似 Whosebug 问题的其他说明

非常感谢您的回答!

你必须缩小你的二维码,因为你手机上的相机可能会创建分辨率如此高的照片,以至于图书馆需要很长时间来处理它们并且只是超时。

在处理它们之前尝试将它们缩小到 512*512。