Hello,
I am trying to implement the decodeFromImage, but i get the following error:
Error: Dimensions could be not found.
at Function.Detector.computeDimension (Detector.js?8d8a:159)
at Detector.processFinderPatternInfo (Detector.js?8d8a:77)
at Detector.detect (Detector.js?8d8a:67)
at QRCodeReader.decode (QRCodeReader.js?d263:63)
at BrowserQRCodeReader.BrowserCodeReader.readerDecode (BrowserCodeReader.js?46a5:251)
at BrowserQRCodeReader.BrowserCodeReader.decodeOnce (BrowserCodeReader.js?46a5:227)
at HTMLImageElement.me.imageLoadedEventListener (BrowserCodeReader.js?46a5:172)
My code:
image = base64
userUploadedImage(image) {
this.QRCodeImageDecoder = new BrowserQRCodeReader();
this.QRCodeImageDecoder.decodeFromImage(undefined, this.$refs.userImage).then((result) => {
console.log(result);
}).catch((err) => {
console.log(err);
});
},
Are there any other accepted format besides a imageURL? I saw #76 with where canvas is used, but no solution. Is canvas the way to go?
I need this for both QR and Barcode.
Probably related to #76
What are my options, to get this working for now?
Deliver a image url from the server?
UPDATE
I got this working with when the blob is captured, to send it to createObjectURL. However, it seems that only where the Barcode is centered and zoomed that it works.
The image that is sent is 4000px by 3000px. Is there a maximum format...
That's very nice. There shouldn't be any issue due to maximum format, your CPU should be the limit; can you send me the image (here or via email) so I can do some tests with it?
I sent the files via gitter pm, thanks.. hope to hear soon from you.
I do get a new error, i think it's the same as in the other issue with base64, but now i use a url.
at MultiFormatOneDReader.OneDReader.decode (OneDReader.js?0859:68)
at BrowserBarcodeReader.BrowserCodeReader.readerDecode (BrowserCodeReader.js?46a5:251)
at BrowserBarcodeReader.BrowserCodeReader.decodeOnce (BrowserCodeReader.js?46a5:227)
at HTMLImageElement.me.imageLoadedEventListener (BrowserCodeReader.js?46a5:172)
I didn't answered nor resolved the issue yet, I just want to let you know that I'm aware of the situation and I'm trying to get the time to work on this. Sorry for the extensive delay. :(
Hope to hear something from you soon. Thanks in advance!
Stale issue message
We can be using codeReader
.decodeFromImageUrl(base64)
.then((result) => {
})
.catch(() => {
});
I tried and working well.
I would recommend using @zxing-js/browser for browser stuff.