private Bitmap creatQRCode(String var1, int var2) {
try {
Hashtable var3 = new Hashtable();
var3.put(EncodeHintType.CHARACTER_SET, "utf-8");
var3.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
var3.put(EncodeHintType.MARGIN, 1);
BitMatrix var4 = (new QRCodeWriter()).encode(var1, BarcodeFormat.QR_CODE, var2, var2, var3);
var4 = this.deleteWhite(var4);
int var5 = var4.getWidth();
int var6 = var4.getHeight();
int[] var7 = new int[var5 * var6];
for (int var8 = 0; var8 < var6; ++var8) {
for (int var9 = 0; var9 < var5; ++var9) {
if (var4.get(var9, var8)) {
var7[var8 * var5 + var9] = -16777216;
} else {
var7[var8 * var5 + var9] = -1;
}
zxing二维码中文乱码问题解决方案
最新推荐文章于 2024-05-23 23:33:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)