Malcon支持多种二维码类型,QR Code,DataMatrix ,PDF 417,RSS等等;
下边讲解一下步骤:
1、读取图片ReadImage
2、创建相对应的条码类型的句柄CreateDataCode2dModel
3、设置条码参数SetDataCode2dParam
4、查找条码:输出条码信息FindDataCode2d
5、设置显示字体SetDisplayFont
6、显示条码信息DispMessage
7、清除条码句柄ClearDataCode2dModel
ReadImage(srcImage,\'DATA_MATRIX_HINT0.bmp\')
CreateDataCode2dModel(\'Data Matrix ECC 200\',\' \',\' \',CodeHandle)
SetDataCode2dParam(CodeHandle,\'polarity\',\'light_on_dark\')
FindDataCode2d(srcImage,symbolXld,CodeHandle,\' \',\' \',ResultHandle,DateString)
SetDisplayFont(3600,26,\' \',\'true\',\'false\')
DispMessage(3600,DateString,\' \',0,0,\'red\',\'true\')
ClearDataCode2dModel(CodeHandle)