1

I have a barcode which is incorrectly recognized as EAN, when it is in fact Code 39. I know the type of barcode beforehand, so I want to tell ZBar to look only for Code 39 barcodes.

I found a related question - Wrong decoding of barcodes also in ZBAR SDK example, but the function it mentions is setSymbology(), and it is absent from the C++ API. Maybe it's only in the iPhone SDK?

Is there an equivalent function for the C++ API?

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

2

I'm not sure if it's an exact equivalent to setSymbology() but I used ImageScanner::set_config() to do the job.

scanner.set_config(ZBAR_EAN8, ZBAR_CFG_ENABLE, 0);
scanner.set_config(ZBAR_EAN13, ZBAR_CFG_ENABLE, 0);

Using this code I could disable all the EAN decoders.

sashoalm
  • 75,001
  • 122
  • 434
  • 781