public class QrCodeUtils extends BaseCodeUtils
CHARSET, IAMGE_FORMAT, logger| 构造器和说明 |
|---|
QrCodeUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedImage |
changeQRCodeImageRGB(BufferedImage image,
boolean changeRgb,
int targetRgb) |
static BufferedImage |
createQRCodeImage(String content,
InputStream logoInput,
QrConts qrConts,
boolean defaultLogo,
boolean defaultFrame,
boolean needCompress,
int targetRgb,
boolean changeRgb)
生成二维码
|
static BufferedImage |
createQRCodeImage(String content,
QrConts qrConts,
boolean defaultLogo,
boolean defaultFrame,
boolean needCompress,
int targetRgb,
boolean changeRgb)
生成二维码
|
static BufferedImage |
drawQRCodeImageFrame(BufferedImage image,
QrConts qrConts,
boolean defaultFrame,
boolean changeRgb,
int targetRgb) |
static int |
getIntFromRGBArray(int Red,
int Green,
int Blue) |
static int[] |
getRGBArrayFromHex(String hexStr) |
static int |
getRGBFromHex(String hexStr) |
convertBase64ToImage, convertImageToBase64, convertImageToBase64public static BufferedImage createQRCodeImage(String content, QrConts qrConts, boolean defaultLogo, boolean defaultFrame, boolean needCompress, int targetRgb, boolean changeRgb) throws com.google.zxing.WriterException
content - 二维码内容logoPath - logo地址needCompress - 是否压缩logocom.google.zxing.WriterExceptionIOExceptionpublic static BufferedImage createQRCodeImage(String content, InputStream logoInput, QrConts qrConts, boolean defaultLogo, boolean defaultFrame, boolean needCompress, int targetRgb, boolean changeRgb) throws com.google.zxing.WriterException, IOException
content - 二维码内容logoPath - logo地址needCompress - 是否压缩logocom.google.zxing.WriterExceptionIOExceptionpublic static BufferedImage drawQRCodeImageFrame(BufferedImage image, QrConts qrConts, boolean defaultFrame, boolean changeRgb, int targetRgb)
public static BufferedImage changeQRCodeImageRGB(BufferedImage image, boolean changeRgb, int targetRgb)
path - 原图地址targetRgb - 目标颜色RGB值 16进制颜色码isNetWork - 原图是否为网络图片地址public static int getRGBFromHex(String hexStr)
public static int[] getRGBArrayFromHex(String hexStr)
public static int getIntFromRGBArray(int Red,
int Green,
int Blue)
Copyright © 2023. All rights reserved.