Javascript 使用javascript从图像中读取条形码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6869445/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
reading barcode from an image using javascript
提问by santubangalore
I need a javascript code that will read/ extract barcode from an image. for example, the image may be embedded in a web page and i wan to pass the image to the Javascript function.
我需要一个可以从图像中读取/提取条形码的 javascript 代码。例如,图像可能嵌入在网页中,我想将图像传递给 Javascript 函数。
The function should read/parse the image and extract the barcode from the image.
该函数应该读取/解析图像并从图像中提取条形码。
回答by Mohsen
Check thisJavaScript barcode scanner It's open sourceand free
Also you can check this JavaScript library https://github.com/EddieLa/BarcodeReader
你也可以检查这个 JavaScript 库https://github.com/EddieLa/BarcodeReader
回答by j.r.clarkin
There is QuaggaJSlibrary (open source) for reading barcodes, all done in JavaScript.
有用于读取条码的QuaggaJS库(开源),全部使用 JavaScript 完成。
It currently supports EAN, CODE 128, CODE 39, EAN 8, UPC-A, UPC-C, and CODABAR
目前支持 EAN、CODE 128、CODE 39、EAN 8、UPC-A、UPC-C 和 CODABAR
I suspect it will meet your needs.
我怀疑它会满足您的需求。