How to obtain scanned barcode type with zxing library?

房东的猫 提交于 2019-12-05 17:45:13
Jacob Jennings

The delegate call back is,

- (void)decoder:(Decoder *)decoder didDecodeImage:(UIImage *)image usingSubset:(UIImage *)subset withResult:(TwoDDecoderResult *)twoDResult {

The readers property in Decoder.mm is a list of FormatReaders.

@interface FormatReader : NSObject {
      zxing::Reader *reader_;
}

The reader_ variable in FormatReader will be a C++ subclass of zxing::Reader, like QRCodeReader. Checking this class name will help identify what symbology you're getting. Beware some of them are 'MultiFormat' readers that combine other readers, so you might have to do some clever inspection.

See How to get class name? for how to get class name in C++.

If you end up making helpful modifications, make sure to submit a patch back to zxing. Good luck!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!