- All Implemented Interfaces:
org.miaixz.bus.core.codec.Decoder<Image,String>
public class QrDecoder
extends Object
implements org.miaixz.bus.core.codec.Decoder<Image,String>
二维码(条形码等)解码器
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors
-
Method Summary
of(boolean isTryHarder,
boolean isPureBarcode)
创建二维码(条形码等)解码器,用于将二维码(条形码等)解码为所代表的内容字符串
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
QrDecoder
public QrDecoder(Map<com.google.zxing.DecodeHintType,Object> hints)
构造
- Parameters:
hints - 自定义扫码配置,包括算法、编码、复杂模式等
-
Method Details
-
of
public static QrDecoder of(boolean isTryHarder,
boolean isPureBarcode)
创建二维码(条形码等)解码器,用于将二维码(条形码等)解码为所代表的内容字符串
- Parameters:
isTryHarder - 是否优化精度
isPureBarcode - 是否使用复杂模式,扫描带logo的二维码设为true
- Returns:
- QrDecoder
-
of
创建二维码(条形码等)解码器
- Parameters:
hints - 自定义扫码配置,包括算法、编码、复杂模式等
- Returns:
- QrDecoder
-
decode
- Specified by:
decode in interface org.miaixz.bus.core.codec.Decoder<Image,String>