c#⽣成条形码(最简单好⽤)引⽤ZXing.dll
void Main(){
本兮没死
const string folder =@"F:\测试图⽚";
Bitmap bitMap =Generate2("1111111",200,120);
Image img = bitMap;
//保存
img.Save(Path.Combine(folder,"test.png"));
img.Dispose();
}
public static Bitmap Generate(string text,int width,int height)
{
BarcodeWriter writer =new BarcodeWriter();
//使⽤ITF 格式,不能被现在常⽤的⽀付宝、扫出来
//如果想⽣成可识别的可以使⽤ CODE_128 格式
//writer.Format = BarcodeFormat.ITF;
writer.Format = BarcodeFormat.CODE_39;
EncodingOptions options =new EncodingOptions()
{
Width = width,
Height = height,
韩国主播夏娃>阿果吉曲的故事Margin =2
};
爱情公寓3图片
writer.Options = options;
Bitmap map = writer.Write(text);
吉克隽
return map;
工商银行信用卡登陆}