Tag: qr code

C#QR位arrays解码

我想知道是否有任何库可以解码QR码位arrays而不是图像。 例如: { {1,1,1,1,1,1,1,0,0,0,1,0,1,0,1,1,1,1,1,1,1}, {1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,1}, {1,0,1,1,1,0,1,0,1,0,1,1,0,0,1,0,1,1,1,0,1}, {1,0,1,1,1,0,1,0,0,0,0,0,1,0,1,0,1,1,1,0,1}, {1,0,1,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0,1}, {1,0,0,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,0,0,1}, {1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1}, {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0}, {1,1,0,1,0,0,1,1,0,0,1,1,1,0,1,1,1,0,1,1,0}, {1,1,1,1,1,1,0,0,1,0,0,1,0,1,0,1,0,1,1,1,1}, {0,1,1,0,0,0,1,1,0,1,1,1,0,0,1,1,1,1,1,0,1}, {1,0,0,1,1,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1}, {0,1,1,0,1,1,1,1,0,0,1,1,0,1,1,1,0,0,1,0,0}, {0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,1,0,1,0,0}, {1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,1,1,0,1,0}, {1,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,1}, {1,0,1,1,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1}, {1,0,1,1,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,1,1}, {1,0,1,1,1,0,1,0,0,1,1,1,0,1,1,1,0,1,1,0,1}, {1,0,0,0,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0,0,0}, {1,1,1,1,1,1,1,0,1,0,1,0,0,1,0,1,0,0,1,1,0} } 会变成“嗨”。 我不需要任何图像function。

报告查看器可能从表单传递图像?

使用visual Studio ultimate 2012。 我目前正在构建一个报告,以便在报告查看器中打印。 到目前为止,我有一堆文本框,通过参数从我的表单文本框中获取其值。 到目前为止一切正常。 然后我遇到了一个重大问题。 如何将图像从我的表单上的图像传递到报表上的图像? 数据库中存在1个图像我相信我可以作为参数调用图像(不确定)。 更大的问题是另一个形象。 另一个图像使用生成QR图像的外部API。 此图像在运行时显示在表单上的图片框中。 我没有将图像保存在我不想要的任何地方。 但我明白我是否需要。 有什么办法我可以将QR图像从我的表格上的图像框传递到我的报告图像框吗? 更新inheritance错误的代码: Microsoft.Reporting.WinForms.ReportParameter rpIMG1 = new Microsoft.Reporting.WinForms.ReportParameter(“paramQRimg”, base64String); Microsoft.Reporting.WinForms.ReportParameter rpIMG2 = new Microsoft.Reporting.WinForms.ReportParameter(“paramQRMi”, “image/png”); reportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8, rp9, rp10, rpIMG1, rpIMG2 }); 设置参数部分出错,它只是说: An error occurred during local report processing. 不知道为什么它不喜欢这个

示例代码,用于检测图像中的QRCode

我在C#中使用此代码来解码(不检测)QRCode并且它可以工作: LuminanceSource ls = new RGBLuminanceSource(image, image.Width, image.Height); Result result = new QRCodeReader().decode(new BinaryBitmap(new HybridBinarizer(ls))); 现在我想在一个更复杂的图像中检测一个QRCode,其中有很多其他的东西,比如图像和文本。 我无法理解如何实现这一点,因为我找不到任何样本并将Bitmap(C#)转换为Bitmatrix for Detector(zxing)并不是那么直接。 有没有人有一段代码可以给我? 非常感谢 UPDATE 我尝试这个代码,但我得到一个ReaderException: 代码: LuminanceSource ls = new RGBLuminanceSource(bitmap, bitmap.Width, bitmap.Height); QRCodeMultiReader multiReader = new QRCodeMultiReader(); Result[] rs = multiReader.decodeMultiple(new BinaryBitmap(new HybridBinarizer(ls)), hints); return rs[0].Text; 例外 com.google.zxing.ReaderException: in com.google.zxing.qrcode.detector.FinderPatternFinder.selectBestPatterns() in com.google.zxing.qrcode.detector.FinderPatternFinder.find(Hashtable hints) in com.google.zxing.qrcode.detector.Detector.detect(Hashtable hints) […]