mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add methods
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
package cn.hutool.extra.qrcode;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.Console;
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 二维码工具类单元测试
|
||||
@@ -61,7 +59,7 @@ public class QrCodeUtilTest {
|
||||
System.out.println(base64);
|
||||
|
||||
byte[] bytes = FileUtil.readBytes(
|
||||
new File("e:/pic/qr.png"));
|
||||
new File("d:/test/qr.png"));
|
||||
String encode = Base64.encode(bytes);
|
||||
String base641 = QrCodeUtil.generateAsBase64("http://hutool.cn/", new QrConfig(400, 400), "png", encode);
|
||||
System.out.println(base641);
|
||||
|
Reference in New Issue
Block a user