首页 > 技术文章 > hutool QrCodeUtil解析二维码出现NotFoundException

zmj-pr 2022-01-10 15:26 原文

解析部分二维码时出现com.google.zxing.NotFoundException:null,解析失败的二维码手机扫是能正常打开的,后面发现这个问题是因为原二维码图片太大了,将图片缩小后正常解析

BufferedImage image = ImgUtil.read(imageFile);

String content = QrCodeUtil.decode(image.getScaledInstance(200, 200, 1));

推荐阅读