serratus/quaggaJS

QuaggaJS not Working on Canvas

Opened this issue · 0 comments

Hi There,
I am using
Quagga.decodeSingle(config,function(result){})
function for decoding of barcode on single image and by using this config
let config={
"inputStream": {
"size": 640,
"singleChannel": false
},
"locator": {
"patchSize": medium,
"halfSample": true
},
"decoder": {
"readers": [
{
"format": "code_128_reader",
"config": {}
}
]
},
"locate": false,
"src": image.toDataURL('image/png',1.0),//here
"numOfWorkers": 1
};

and It works fine when I pass in above src as the address of the loaded image in an image tag(as image.src).but when I load that image into a canvas and passed as DataURL of the canvas as shown above. it will not work on that image.
I am trying the below image.
code123
So I there Something I am doing wrong let me know.