Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

big images cannot be scanned succesfully, in the first attempt. #1

Closed
ontheway16 opened this issue Jun 19, 2022 · 7 comments
Closed

Comments

@ontheway16
Copy link

Hello, I am trying different images with the codepen demo site, but have a problem.
Files of very big images (40-50 MP) are returning with no results '[ ]', in the first try.

Same image, second attempt from same file, all is well, all qrcodes are correctly identified. If I resize down to something around 2000px width, instant result comes, no problems even in the first attempt with that file.

What might be causing this ?

@undecaf
Copy link
Owner

undecaf commented Jun 19, 2022

Does zbar-wasm behave in the same way when you post the images to the demo site: https://undecaf.github.io/barcode-detector-polyfill/example/ ? This would eliminate effects caused by running the demo in Codepen.

If the behavior is the same then please copy and post the output from the dev tools console of your browser.

Having the images available on some public place (Dropbox etc.) would also be helpful for testing if the QR codes do not contain sensitive information.

@ontheway16
Copy link
Author

Thank you for the fast response, I tried and first image returned with null.
But, second and following images (all same size, big) created no problems (They were completely new to browser, not scanned formerly). Also, initially failed image succeeded in the second attempt.

Here is a dropbox link of a sample image.
https://www.dropbox.com/s/nfi0vhzu7bvkqq9/test_image2.jpg?dl=0

@undecaf
Copy link
Owner

undecaf commented Jun 19, 2022

Fixed in version 0.9.11. Thanks @ontheway16 for pointing this out so that I could fix a stupid mistake.
Please note that you may have to add the version number to CDN links until the CDNs catch up.

@ontheway16
Copy link
Author

One last thing, can you please kindly update the following link, with the applied update?

https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm/dist/index.js

Thank you !

@undecaf
Copy link
Owner

undecaf commented Jun 24, 2022

https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm/dist/index.js already points to the most recent release (0.9.11). After a new release has been published, it always takes some time for this link to get updated, and I cannot influence this process.

Specifying the release as part of the link (such as in https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.9.11/dist/index.js) allows accessing any release immediately after it has been published, and no ambiguities can arise later when new (possibly incompatible) releases get published.

@ontheway16
Copy link
Author

ontheway16 commented Jun 24, 2022

Does this demo link already at latest, as of now ?
https://undecaf.github.io/barcode-detector-polyfill/example/

Since I just checked, it failed to read in the first attempt (different image, but same image size (pixels) at above link).
Second attempt with same image file, succeeded.

@undecaf
Copy link
Owner

undecaf commented Jul 1, 2022

@ontheway16: Updated barcode-detector-polyfill to 0.9.11 as well, barcode detected now on first scan also in large images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants