From a764477cc07fcd14c2d509befbfab143ac592445 Mon Sep 17 00:00:00 2001 From: TomXin <766781886@qq.com> Date: Tue, 23 Aug 2022 13:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96QrCodeUtil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java b/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java index 2684c5fcc..cbe0c6a41 100755 --- a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java @@ -358,7 +358,7 @@ public class QrCodeUtil { */ public static BufferedImage generate(String content, BarcodeFormat format, QrConfig config) { final BitMatrix bitMatrix = encode(content, format, config); - final BufferedImage image = toImage(bitMatrix, config.foreColor != null ? config.foreColor : 0xFF000000, config.backColor); + final BufferedImage image = toImage(bitMatrix, config.foreColor != null ? config.foreColor : Color.BLACK.getRGB(), config.backColor); final Image logoImg = config.img; if (null != logoImg && BarcodeFormat.QR_CODE == format) { // 只有二维码可以贴图