我尝试使用一些SDK,但我尝试的SDK不是免费的.
有没有免费的SDK可以从图像中读取2d条形码?
解决方法 有一个 example available:using DataMatrix.net; // Add ref to DataMatrix.net.dll using System.Drawing; // Add ref to System.Drawing. [...] // --------------------------------------------------------------- // Date 180310 // Purpose Get text from a DataMatrix image. // Entry sfilename - name of the barcode file (PNG,+ path). // Return The text. // Comments See source,project DataMatrixTest,Program.cs. // --------------------------------------------------------------- private string DecodeText(string sfilename) { Dmtximagedecoder decoder = new Dmtximagedecoder(); System.Drawing.Bitmap oBitmap = new System.Drawing.Bitmap(sfilename); List<string> oList = decoder.DecodeImage(oBitmap); StringBuilder sb = new StringBuilder(); sb.Length = 0; foreach (string s in oList) { sb.Append(s); } return sb.ToString(); }
你需要DataMatrix.net!
总结以上是内存溢出为你收集整理的c# – 从图像中读取二维条码全部内容,希望文章能够帮你解决c# – 从图像中读取二维条码所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)