Disable revers image scan in zxing app

358 views Asked by At

How to disable reverse image scan in zxing android app? Is it possible to do with app settings or modifying sources? I just want to scan code from left to the right direction (green line). And not to scan code from right to left direction (red line). There are some pseudo barcodes without error control (en.wikipedia.org/wiki/Pharmacode for example) which have different codes in two directions. Thanks for any help!

Green line - allowed. Red line - forbidden

1

There are 1 answers

0
Morrison Chang On

If the format isn't supported (and Pharmacode isn't on the list of ZXing barcodes: https://github.com/zxing/zxing/blob/master/README.md) you'll have to modify the ZXing code to support your specific format or find/buy/license a library that does. The fact that I can flip a UPC or Code128 barcode is embedded in the decode logic for that code type.

Honestly I believe it will take some effort to modify ZXing as you will need to modify a 1-D decoder to take in a orientation value or modify the decoding output to handle both orientation cases and separately parse out the correct orientation results.