/// <summary>
/// 获取条形码图片
/// </summary>
/// <param name="BarcodeString"></param>
/// <param name="ImgWidth"></param>
/// <param name="ImgHeight"></param>
/// <returns></returns>
public static Image CreateBarcodePicture(string BarcodeString, int ImgWidth, int ImgHeight)
{
Barcode b = new Barcode();//实例化一个条码对象
TYPE type = TYPE.CODE128;//编码类型
//获取条码图片
System.Drawing.Image BarcodePicture = b.Encode(type, BarcodeString, System.Drawing.Color.Black, System.Drawing.Color.White, ImgWidth, ImgHeight);
// b.Dispose();
return BarcodePicture;
}
版权归属:
轨迹
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区