ZXing から Objective-C へのポートであり、複数のバーコード スキャンをサポートするこのライブラリhttps://github.com/TheLevelUp/ZXingObjCを見つけました。アプリに必要なので、機能させようとしましたが、複数のバーコードを含む画像を渡すと何も検出されません使用しているコードは次のとおりです
CGImageRef imageToDecode = self.imgn.image.CGImage; // Given a CGImage in which we are looking for barcodes
ZXLuminanceSource* source = [[[ZXCGImageLuminanceSource alloc] initWithCGImage:imageToDecode] autorelease];
ZXBinaryBitmap* bitmap = [ZXBinaryBitmap binaryBitmapWithBinarizer:[ZXHybridBinarizer binarizerWithSource:source]];
NSError* error = nil;
ZXDecodeHints* hints = [ZXDecodeHints hints];
ZXMultiFormatReader* reader = [ZXMultiFormatReader reader];
ZXGenericMultipleBarcodeReader* multi = [[ZXGenericMultipleBarcodeReader alloc] initWithDelegate:reader];
NSArray * result = [multi decodeMultiple:bitmap hints:hints error:&error];
これは nil 配列を返し、エラーには「バーコードが見つかりません」というエラーが含まれます。1 つのバーコードだけで MultiFormatReader を使用する場合は問題ありませんが、MultiFormatReader でよく認識される同じバーコードを複数含む画像を追加すると、何も検出されません。