decodeFromImage not working with base64
See original GitHub issueHello,
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Decoding Image Base64 String not working - Stack Overflow
Agree, first thing to check is the base64 data on the sender and receiver end, then you can pinpoint the problem.
Read more >Base64 to Image | Base64 Decode | Base64 Converter
Convert Base64 to image online using a free decoding tool which allows you to decode Base64 as image and preview it directly in...
Read more >base64 — Base16, Base32, Base64, Base85 Data Encodings ...
The legacy interface does not support decoding from strings, but it does provide functions for encoding and decoding to and from file objects....
Read more >RFC 4648: The Base16, Base32, and Base64 Data Encodings
Network Working Group S. Josefsson Request for Comments: 4648 SJD Obsoletes: 3548 ... However, MIME does not define "base 64" per se, but...
Read more >atob() - Web APIs - MDN Web Docs
InvalidCharacterError DOMException. Thrown if encodedData is not valid base64. ... Report problems with this compatibility data on GitHub ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can be using codeReader .decodeFromImageUrl(base64) .then((result) => { }) .catch(() => { }); I tried and working well.
Hope to hear something from you soon. Thanks in advance!