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

Detecting multiple code types #23

Closed
AndreMiras opened this issue May 27, 2018 · 2 comments
Closed

Detecting multiple code types #23

AndreMiras opened this issue May 27, 2018 · 2 comments

Comments

@AndreMiras
Copy link

I'm currently migrating my app (https://github.com/AndreMiras/QrScan) and libraries (https://github.com/kivy-garden/garden.zbarcam) from zbar (built-in module) to zbarlight, and I came across this: https://github.com/Polyconseil/zbarlight/blob/2.0/src/zbarlight/_zbarlight.c#L27

zbar_image_scanner_set_config(scanner, 0, ZBAR_CFG_ENABLE, 0); /* disable all symbologies */
zbar_image_scanner_set_config(scanner, symbologie, ZBAR_CFG_ENABLE, 1);

I can imagine enabling only one type at a time is currently a feature of this project. But I think it would be great to have the choice to enable multiple features at a time with a list, e.g.

zbarlight.scan_codes(['qrcode', 'ean13'], pil_image)
AndreMiras added a commit to kivy-garden/garden.zbarcam that referenced this issue May 27, 2018
Moves from unmaintained zbar core python module, to `zbarlight` one.
Currently uses an old `zbarlight==1.2` version rather than `2.0`
because the other one requires `setuptools>=30.3` which doesn't yet
have working p4a recipe.
Unfortunately `zbarlight` doesn't yet make it possible to detect
multiple code types at the same time, see:
Polyconseil/zbarlight#23
But this is something we may workaround until it gets integrated
upstream.
Also, this brings another regression since the code type detection
is fixed to `qrcode`. This will be fixed in subsequent commits.
Last, this commit doesn't yet provide Python3 support, but migrating
was the first mandatory step of it.
AndreMiras added a commit to kivy-garden/garden.zbarcam that referenced this issue May 27, 2018
Moves from unmaintained zbar python module, to `zbarlight` one.
Currently uses an old `zbarlight==1.2` version rather than `2.0`
because the other one requires `setuptools>=30.3` which doesn't yet
have working p4a recipe.
Unfortunately `zbarlight` doesn't yet make it possible to detect
multiple code types at the same time, see:
Polyconseil/zbarlight#23
But this is something we may workaround until it gets integrated
upstream.
Also, this brings another regression since the code type detection
is fixed to `qrcode`. This will be fixed in subsequent commits.
Last, this commit doesn't yet provide Python3 support, but migrating
was the first mandatory step of it.
AndreMiras added a commit to kivy-garden/garden.zbarcam that referenced this issue May 27, 2018
zbarlight doesn't yet provide a more efficient way to do this, see:
Polyconseil/zbarlight#23
@fbochu
Copy link
Contributor

fbochu commented Jun 1, 2018

Searching for only one kind of bar code a the time is not a wanted feature of zbarlight, It's just that for now we only need to search for one kind of bar code at once.

fbochu pushed a commit that referenced this issue Jun 1, 2018
As suggested by @AndreMiras, zbarlight should be able to scan more than
one code type at once.

resolve #23
fbochu pushed a commit that referenced this issue Jun 1, 2018
As suggested by @AndreMiras, zbarlight should be able to scan more than
one code type at once.

resolve #23
@fbochu fbochu closed this as completed in be1fdb5 Jun 4, 2018
@fbochu
Copy link
Contributor

fbochu commented Jun 4, 2018

The new feature is available in zbarlight 2.1. Please let's us known if you have issue using it.

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

No branches or pull requests

2 participants