zing生成带logo的二维码
程序员文章站
2022-07-14 10:02:01
...
主要代码:
@SuppressWarnings({"rawtypes","unchecked","finally"})
public class Test {
public static void main(String[] args) throws IOException {
Test test = new Test();
String content = "http://www.baidu.com";
test.createQrCode(content, 3000, 3000, "C:/imgQRCode.jpg","C:/logo.jpg","png",0xFF000000,0xFFFFFFFF);
//解析二维码
String text = test.decode("C:/imgQRCode.jpg");
System.out.println(text);
}
只要运行com.zxing.imgQRCode包下的Test.java即可生成带彩色logo的二维码
源码文件下载见附件
本文出自 “点滴积累” 博客,请务必保留此出处http://tianxingzhe.blog.51cto.com/3390077/1682862
上一篇: python可视化1
下一篇: MySQL创建计算字段