The process of scanning barcodes from images in Bitmap mode is as follows.
// Obtain the camera sampling data sampleBuffer.
-(void)captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection{
// Add the sample code in steps 2 and 3. After the processing is complete, release data.
} // QR_CODE | DATA_MATRIX is set for the barcode format, indicating that Scan Kit will support only the QR code and DataMatrix. HmsScanOptions *options = [[HmsScanOptions alloc] initWithScanFormatType:QR_CODE | DATA_MATRIX];
QR_CODE | DATA_MATRIX is set for supporting the QR code and DataMatrix.
// Obtain the decoding result for a single barcode. NSDictionary *dic = [HmsBitMap bitMapForSampleBuffer:sampleBuffer withOptions:options]; // Obtain the decoding result for multiple barcodes. NSArray *list = [HmsBitMap multiDecodeBitMapForSampleBuffer:sampleBuffer withOptions:options];
For details about the returned value, please refer to Default View.