有没有二维码生成源码? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jwangkun
V2EX    问与答

有没有二维码生成源码?

  •  
  •   jwangkun 2014-08-06 18:20:17 +08:00 4647 次点击
    这是一个创建于 4166 天前的主题,其中的信息可能已经有所发展或是发生改变。
    有没有二维码生成源码?由于最近公司想做基于二维码的开发,和定制功能,目前市场上有没有成型的源码或者免费API接口?有做过相关的Ver给点建议!
    8 条回复    2016-09-23 10:53:14 +08:00
    fbzl
        1
    fbzl  
       2014-08-06 18:31:14 +08:00   1
    janxin
        2
    janxin  
       2014-08-06 18:35:21 +08:00   1
    omi4399
        3
    omi4399  
       2014-08-06 19:56:26 +08:00
    墙外用 google chart

    墙内 http://www.liantu.com/
    66450146
        4
    66450146  
       2014-08-06 20:09:39 +08:00   1
    xarrow
        5
    xarrow  
       2014-08-06 23:16:35 +08:00   1
    zxing
    frankzeng
        6
    frankzeng  
       2014-08-07 12:04:45 +08:00
    php用phpqrcode
    xarrow
        7
    xarrow  
       2014-08-09 15:45:36 +08:00   1
    <pre>
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using ThoughtWorks.QRCode.Codec;
    using ThoughtWorks.QRCode.Codec.Data;

    namespace WindowsFormsApplication2
    {
    //构造类
    class QRCode {
    //构造方法
    public QRCode(PictureBox pic)
    {
    //实例化
    ThoughtWorks.QRCode.Codec.QRCodeEncoder coder = new QRCodeEncoder();
    //编码方法
    coder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
    //大小
    coder.QRCodeScale = 25;
    //版本
    coder.QRCodeVersion = 0;
    //纠错码等级
    // QR码有容错能力,QR码图形如果有破损,仍然可以被机器读取内容,
    //最高可以到7%~30%面积破损仍可被读取。所以QR码可以被广泛使用在运输外箱上。

    //相对而言,容错率愈高,QR码图形面积愈大。所以一般折衷使用15%容错能力。
    //错误修正容量
    //L水平 7%的字码可被修正
    //M水平 15%的字码可被修正
    //Q水平 25%的字码可被修正
    //H水平 30%的字码可被修正
    coder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;

    string str = "Hello,World";

    /*建议使用UTF8 编码,提供中文
    QR码数据容量
    数字 最多7,089字符
    字母 最多4,296字符
    二进制数(8 bit) 最多2,953 字节
    日文汉字/片假名 最多1,817字符(采用Shift JIS)
    中文汉字 最多984字符(采用UTF-8)
    中文汉字 最多1,800字符(采用BIG5)
    */
    System.Drawing.Bitmap b = coder.Encode(str.ToString(), Encoding.UTF8);
    Image i = b;

    //Object o = System.Reflection.Missing.Value;

    pic.Image = b;
    pic.SizeMode = PictureBoxSizeMode.Zoom;
    }

    }
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    QRCode qr = new QRCode(pictureBox1);


    }
    }
    }

    </pre>

    以前用C#写的,比较乱..
    jiane
        8
    jiane  
       2016-09-23 10:53:14 +08:00
    联图的二维码在线生成 API : https://www.juhe.cn/docs/api/id/189
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2568 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 32ms UTC 13:53 PVG 21:53 LAX 05:53 JFK 08:53
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86