【发布时间】:2018-08-12 20:12:53
【问题描述】:
我有一个 QRCode 图像及其内容:P01 V0N S0000000
我尝试使用node-qrcode 使用不同的matchPattern 重新生成此图像:
const $qr = require('qrcode')
const text = 'P01 V0N S0000000'
for (let i = 0; i < 8; i++) {
let path = `P01V0NS0000000-${i}.png`
const opt = {
maskPattern: i
}
$qr.toFile(path, text, opt, function (err) {
if (err) {
console.log(err)
} else {
console.log(opt)
}
})
}
我也尝试过使用不同的version 参数,但所有版本>1 都会生成非常密集的模式。
这个 QRCode 图像是用某种salt 生成的,难以复制吗?
【问题讨论】: