ITeye博客

C# DataMatrix.net使用

thoreau · 2016-05-03 12:19 · C# · 行业应用 · Markdown

使用DataMatrix.net.dll来生成二维码,可控制二维码长宽

 

样例代码:

DmtxImageEncoder Die = new DmtxImageEncoder();
DataMatrix.net.DmtxImageEncoderOptions option = new DmtxImageEncoderOptions();
option.SizeIdx = DmtxSymbolSize.DmtxSymbol16x16;//形状
option.MarginSize = 0;//边距
option.ModuleSize = 3;//点阵大小

string txt = "123abc";
Bitmap b = Die.EncodeImage(txt, option);

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。