BinaryEye icon indicating copy to clipboard operation
BinaryEye copied to clipboard

Does not recognize linear barcodes in white on black

Open staydry opened this issue 1 year ago • 3 comments

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 avatar May 29 '24 13:05 staydry

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.

markusfisch avatar May 30 '24 14:05 markusfisch

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

staydry avatar Jun 03 '24 10:06 staydry

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.

staydry avatar Jun 11 '24 12:06 staydry