Polyconseil / zbarlight

A simple wrapper for zbar
BSD 3-Clause "New" or "Revised" License
163 stars 37 forks source link

Detecting multiple code types #23

Closed AndreMiras closed 6 years ago

AndreMiras commented 6 years ago

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)
fbochu commented 6 years ago

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 commented 6 years ago

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