首页 新闻 会员 周边

使用BarcodeLib.dll生成的一维码

0
悬赏园豆:20 [已关闭问题] 关闭于 2016-04-18 17:35
   public Image GetImage(int height,int width, BarcodeLib.TYPE type,string code) 
        {
            Image image;
            BarcodeLib.Barcode b = new BarcodeLib.Barcode();
            b.BackColor = System.Drawing.Color.White;//图片背景颜色
            b.ForeColor = System.Drawing.Color.Black;//条码颜色
            b.IncludeLabel = true;
            b.Alignment = BarcodeLib.AlignmentPositions.LEFT;
            b.LabelPosition = BarcodeLib.LabelPositions.BOTTOMCENTER;//code的显示位置
            b.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;//图片格式
            System.Drawing.Font font = new System.Drawing.Font("verdana", 12f);//字体设置           
            b.LabelFont = font;
            b.Height = height;//图片高度设置(px单位)
            b.Width = width;//图片宽度设置(px单位)

            image = b.Encode(type,code);//生成图片
            return image;

        }

生成的图片怎么设置让他变成这样呢?  求大神指点 小弟在此拜谢了

liyanzhao的主页 liyanzhao | 初学一级 | 园豆:42
提问于:2016-04-18 17:12
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册