dlenski / python-zxing

python wrapper for the ZXing barcode library
GNU Lesser General Public License v3.0
121 stars 36 forks source link

Added products_only argument (from java cli) to decode method. #9

Closed vladvrabie closed 3 years ago

vladvrabie commented 3 years ago

This is useful in the use case of processing 1D code bars (no QR codes and the like).

dlenski commented 3 years ago

It looks like this is basically equivalent to setting a specific set of possible_formats, right?

https://github.com/zxing/zxing/blob/master/javase/src/main/java/com/google/zxing/client/j2se/DecoderConfig.java#L88-L93

vladvrabie commented 3 years ago

Exactly, but i didn't find that list :)) When I researched zxing, I managed to find it's list of command line parameters, so that guided me

dlenski commented 3 years ago

This is useful in the use case of processing 1D code bars (no QR codes and the like).

This seems fine with me, though if your goal is to be able to read any of the 1D barcodes supported by ZXing decoder, then you'll want to add these additional possible formats.

https://github.com/zxing/zxing/blob/master/javase/src/main/java/com/google/zxing/client/j2se/DecoderConfig.java#L88-L100

vladvrabie commented 3 years ago

This is useful in the use case of processing 1D code bars (no QR codes and the like).

This seems fine with me, though if your goal is to be able to read any of the 1D barcodes supported by ZXing decoder, then you'll want to add these additional possible formats.

https://github.com/zxing/zxing/blob/master/javase/src/main/java/com/google/zxing/client/j2se/DecoderConfig.java#L88-L100

Good to know, thank you. I will research those as well to see if they fit my use case

Update: I think using just the types of codes included in the products_only flag is fine for my use case