DmDecoder是一款免费的Datamatrix二维码解码软件,能快速准确的对包含Datamatrix二维码的图片进行解码;对于模糊、变形或者污染的二维码也有较好的解码表现。同时也提供了DmDecoder的API,您可以在您的项目中使用方便地使用DmDecoder。下载及了解详情请访问tonxon.com。
Datamatrix二维码为下图格式,广泛用于工业、物流等环境下。
访问 tonxon.com/api_dmdecoder.htm 下载API(DLL),简单设置就可以将DmDocoder解码功能加入到您的应用中。同一般动态链接库函数调用方法一样,使用DmDecoder API非常简单:
1、确定已经将DmDecoder.dll及DmDecoder.lib都copy到您的项目目录下。
2、将DmDecoder.lib添加到您的项目设置中: 工程 -> 设置 -> 连接 -> 对象/模块库。
3、在cpp文件的头部添加API的函数声明:
#pragma once
#define DLL_EXPORT __declspec(dllexport)
extern "C" DLL_EXPORT int _stdcall DataMatrix_decode(const char* filename);
//DataMatrix_decode_rt --> 对设备采集的图像进行实时处理
//imageData : 指向图像数据区的指针(24位位图)
//width : 图像宽度
//height : 图像高度
extern "C" DLL_EXPORT int _stdcall DataMatrix_decode_rt(unsigned char* imageData, int width, int height);
extern "C" DLL_EXPORT int _stdcall DataMatrix_output(unsigned char* message);
4、代码范例:
char* file = "Sample.bmp";//待解码图片路径
int length = DataMatrix_decode(file); //解码并返回码字长度(解码失败则返回-1)
if(length>0){
unsigned char* message = new unsigned char[length];
DataMatrix_output(message);//将解码码字保存到数组中
//your codes here
delete[] message;
}
同时还提供了Visual C++ 6.0、Visual Basic6.0等范例项目文件。
Datamatrix二维码为下图格式,广泛用于工业、物流等环境下。
访问 tonxon.com/api_dmdecoder.htm 下载API(DLL),简单设置就可以将DmDocoder解码功能加入到您的应用中。同一般动态链接库函数调用方法一样,使用DmDecoder API非常简单:
1、确定已经将DmDecoder.dll及DmDecoder.lib都copy到您的项目目录下。
2、将DmDecoder.lib添加到您的项目设置中: 工程 -> 设置 -> 连接 -> 对象/模块库。
3、在cpp文件的头部添加API的函数声明:
#pragma once
#define DLL_EXPORT __declspec(dllexport)
extern "C" DLL_EXPORT int _stdcall DataMatrix_decode(const char* filename);
//DataMatrix_decode_rt --> 对设备采集的图像进行实时处理
//imageData : 指向图像数据区的指针(24位位图)
//width : 图像宽度
//height : 图像高度
extern "C" DLL_EXPORT int _stdcall DataMatrix_decode_rt(unsigned char* imageData, int width, int height);
extern "C" DLL_EXPORT int _stdcall DataMatrix_output(unsigned char* message);
4、代码范例:
char* file = "Sample.bmp";//待解码图片路径
int length = DataMatrix_decode(file); //解码并返回码字长度(解码失败则返回-1)
if(length>0){
unsigned char* message = new unsigned char[length];
DataMatrix_output(message);//将解码码字保存到数组中
//your codes here
delete[] message;
}
同时还提供了Visual C++ 6.0、Visual Basic6.0等范例项目文件。