QRCode
百度百科:
QR Code码,是由Denso公司于1994年9月研制的一种矩阵二维码符号,它具有一维条码及其它二维条码所具有的信息容量大、可靠性高、可表示汉字及图象多种文字信息、保密防伪性强等优点。
wiki:
QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan. A barcode is a machine-readable optical label that contains information about the item to which it is attached. A QR code uses four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to efficiently store data; extensions may also be used
下面是要演示的项目
boombuler/barcode生成二维码
github地址:https://github.com/boombuler/barcode
star 300
生成二维码图片示例:
package main import ( "image/png" "os" "github.com/boombuler/barcode" "github.com/boombuler/barcode/qr" ) func main() { qrCode, _ := qr.Encode("hello world", qr.M, qr.Auto) qrCode, _ = barcode.Scale(qrCode, 256, 256) file, _ := os.Create("qr2.png") defer file.Close() png.Encode(file, qrCode) }
下面的也不错
github地址:https://github.com/skip2/go-qrcode
star 211
github地址:https://github.com/tuotoo/qrcode
star 13
参考文档:http://blog.csdn.net/wangshubo1989/article/details/77897363
–
–
–
评论前必须登录!
注册