Closed justwiebe closed 2 years ago
Thank you for filing an issue! Please be patient. :-)
I'm having a little bit of brainfog this evening, so I'm not sure what all might have to be changed for that function to work asynchronously, I'd need to do a little investigation when I'm thinking a little more clearly.
You might just be able to do something like
async decodeImage(inputImageWrapper: ImageWrapper) {
const data = inputImageWrapper.getAsRGBA();
const result = await (howeverYouAccessQrScanner());
....
return result;
}
however, i feel like that might not be quite enough there. :|
@BakoviDagi I took a quick stab at this problem, if you've got capability to give it a try and see if it suits your needs, that'd be great.
I'm not publishing it straight away, as it's presently breaking the code-32 tests, which i'll need to spend some real time digging into to discover if the tests are broken or if the code 32 code or the code it inherits from is broken.
@BakoviDagi i just merged that, it should be publishing as 1.5.0 shortly. If you could give it a spin and lmk that'd be great.
... and i just discovered that my version publisher is broken. so, it'll be up as soon as i figure out how to fix that.
OK, manual publishing it is! Please let me know if 1.5.0 works!
@ericblade Thanks! I'll test it on Monday and let you know!
@ericblade It works great, thanks!
I'm working on implementing a QR Reader, based off of your other project, but with the "qr-scanner" dependency instead (looks smaller). The problem is, that is async, so I'm having to look into how to force it to be synchronous. It would be great if
decodeFromImage
was async https://github.com/ericblade/quagga2/blob/master/src/decoder/barcode_decoder.js#L258