You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How does it work in nodejs? The code for de mo has been invalid
I run in Nodejs after prompting "NotFoundException: No MultiFormat Readers were able to detect the code."
What do I need to do? 🤯
Are there any other demo codes? 🤔️
greenking19
changed the title
How does it work in nodejs? The code for de mo has been invalid
How does it work in nodejs? The code for demo has been invalid
May 21, 2024
I think this code cannot work. As far as I understand, with the following line const byteArray = new Uint8Array(fileBuffer);
you pack the whole file's contents into a byte array. However, this doesn't abstract away the file encoding (jpg, png, whatever). The RGBLuminanceSource expects the pure rgb information of the image without encoding specifics.
One way to solve this is go via the file browser code readers, however that only works if you're not using nodejs server side without any dom tree. Otherwise, I think, you'd have to use some library (e.g. opencv) to get to the pixel info independent of the file encoding (i.e., opencv abstracts away the file encoding specifics and easily lets you access the pixel bytes, you can then pack those into a Uint8Array).
Is that correct @werthdavid
How does it work in nodejs? The code for de mo has been invalid
I run in Nodejs after prompting "NotFoundException: No MultiFormat Readers were able to detect the code."
What do I need to do? 🤯
Are there any other demo codes? 🤔️
The text was updated successfully, but these errors were encountered: