Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reading barcode from an image using javascript

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.

The function should read/parse the image and extract the barcode from the image.

like image 983
santubangalore Avatar asked Jul 29 '11 06:07

santubangalore


People also ask

Can I scan a picture of a barcode?

The simple answer is yes - if the barcode scanner that you have has what is known as a 2D (two dimensional) imager as its scan engine.


1 Answers

There is QuaggaJS library (open source) for reading barcodes, all done in JavaScript.

It currently supports EAN, CODE 128, CODE 39, EAN 8, UPC-A, UPC-C, and CODABAR

I suspect it will meet your needs.

Update: 2021-August

Looks like the original QuaggaJS is no longer actively maintained.

Quagga2 is active and continues the goals of the original.

(thanks @bertasoft for the tip!)

like image 127
j.r.clarkin Avatar answered Sep 21 '22 18:09

j.r.clarkin