企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
**boombuler/barcode生成二维码** github地址:https://github.com/boombuler/barcode 获取: ~~~ go get github.com/boombuler/barcode ~~~ 生成二维码图片: ~~~ package main import ( "image/png" "os" "github.com/boombuler/barcode" "github.com/boombuler/barcode/qr" ) func main() { qrCode, _ := qr.Encode("http://blog.csdn.net/wangshubo1989", qr.M, qr.Auto) qrCode, _ = barcode.Scale(qrCode, 256, 256) file, _ := os.Create("qr2.png") defer file.Close() png.Encode(file, qrCode) } ~~~