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

Does not recognize linear barcodes in white on black #461

Open
staydry opened this issue May 29, 2024 · 3 comments
Open

Does not recognize linear barcodes in white on black #461

staydry opened this issue May 29, 2024 · 3 comments

Comments

@staydry
Copy link

staydry commented May 29, 2024

Hi! Great tool, thank you for developing it.

Noticed that it does not recognize linear barcodes in white on black background (some manufacturers use them making their black packaging more attractive): looks like it tries to read black stripes instead of white in such cases.

Affected types: EAN-13/8, UPC-A/E, Code-128/93/39, Interleaved 2 of 5, Codabar, PDF417, etc.

Regards!

@staydry staydry changed the title Does not recognize barcodes in white on black (at least some) Does not recognize 'striped' barcodes in white on black May 29, 2024
@staydry staydry changed the title Does not recognize 'striped' barcodes in white on black Does not recognize linear barcodes in white on black May 29, 2024
@markusfisch
Copy link
Owner

Hi, and thanks for filing an issue about this! 👍

This is a limitation of ZXingCpp, the barcode library this app is using. The standards of the affected types don't include negated versions, so support for this was excluded.

@staydry
Copy link
Author

staydry commented Jun 3, 2024

Thanks for feedback! I have notified ZXingCpp guys on this issue so may be they will implement inverted barcodes processing one day.

@staydry
Copy link
Author

staydry commented Jun 11, 2024

Further to above

Since inverted 1D barcodes use is not a widespread practice they are not going to implement automatic detection of those yet but mention that such a detection can be arranged on application side -

----quote----
If you need to support those, you may easily do so by inverting the image before you pass it to zxing-cpp. In that case, I'd recommend to set ReaderOptions::tryInvert to false, to not do unnecessary extra work for any 2D symbology that actually supports inverted colors.
---unquote---

Just for case you find that worthwhile in the future.

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