public abstract class AbstractEnDeCoder extends Object implements QrCodeEnDeCoder
| 限定符和类型 | 字段和说明 |
|---|---|
static Map<com.google.zxing.DecodeHintType,Object> |
DECODE_HINTS |
| 构造器和说明 |
|---|
AbstractEnDeCoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
calLogoBorderSize(BufferedImage logoImg,
QrCodeConfig config)
计算logo的边框粗细
|
protected int |
calLogoRadius(BufferedImage logoImg,
QrCodeConfig config) |
protected BufferedImage |
coverQrCodeToBgImage(BufferedImage qrCode,
QrCodeConfig config) |
String |
decode(BufferedImage image) |
protected BufferedImage |
decorate(QrCodeConfig config,
BitMatrixInfo bitMatrixInfo)
根据config的配置来装饰原始的二维码信息
比如设置圆角\添加logo等
|
protected void |
drawLogoOnQrCode(BufferedImage qrCode,
QrCodeConfig config) |
protected BufferedImage |
drawQrCode(BitMatrixInfo bitMatrixInfo,
QrCodeConfig config)
修改MatrixToImageWriter.toBufferedImage(BitMatrix matrix, MatrixToImageConfig config)方法
|
BufferedImage |
encodeAsBufferedImage(QrCodeConfig config) |
protected BitMatrixInfo |
encodeMsgToMatrix(QrCodeConfig config) |
void |
write(QrCodeConfig config,
OutputStream outputStream) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecodeFromBase64, decodeFromPath, encodeAsBase64, encodeAsFilepublic BufferedImage encodeAsBufferedImage(QrCodeConfig config) throws com.google.zxing.WriterException, IOException
encodeAsBufferedImage 在接口中 QrCodeEnDeCodercom.google.zxing.WriterExceptionIOExceptionpublic String decode(BufferedImage image) throws com.google.zxing.FormatException, com.google.zxing.ChecksumException, com.google.zxing.NotFoundException
decode 在接口中 QrCodeEnDeCodercom.google.zxing.FormatExceptioncom.google.zxing.ChecksumExceptioncom.google.zxing.NotFoundExceptionpublic void write(QrCodeConfig config, OutputStream outputStream) throws IOException, com.google.zxing.WriterException
write 在接口中 QrCodeEnDeCoderIOExceptioncom.google.zxing.WriterExceptionprotected BitMatrixInfo encodeMsgToMatrix(QrCodeConfig config) throws com.google.zxing.WriterException
com.google.zxing.WriterExceptionprotected BufferedImage decorate(QrCodeConfig config, BitMatrixInfo bitMatrixInfo) throws IOException
config - bitMatrixInfo - IOExceptionprotected BufferedImage drawQrCode(BitMatrixInfo bitMatrixInfo, QrCodeConfig config)
bitMatrixInfo - config - protected void drawLogoOnQrCode(BufferedImage qrCode, QrCodeConfig config) throws IOException
IOExceptionprotected BufferedImage coverQrCodeToBgImage(BufferedImage qrCode, QrCodeConfig config) throws IOException
IOExceptionprotected int calLogoBorderSize(BufferedImage logoImg, QrCodeConfig config)
protected int calLogoRadius(BufferedImage logoImg, QrCodeConfig config)
Copyright © 2017. All rights reserved.