Support transparent-bg QR codes
parent
d8b037a15b
commit
4da495a8cc
|
@ -48,6 +48,8 @@ class QrcodeDecoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.gCtx!.clearRect(0, 0, width, height);
|
this.gCtx!.clearRect(0, 0, width, height);
|
||||||
|
this.gCtx!.fillStyle = "#ffffff";
|
||||||
|
this.gCtx!.fillRect(0, 0, width, height);
|
||||||
this.gCtx!.drawImage(target, 0, 0, width, height);
|
this.gCtx!.drawImage(target, 0, 0, width, height);
|
||||||
|
|
||||||
const imageData = this.gCtx!.getImageData(
|
const imageData = this.gCtx!.getImageData(
|
||||||
|
|
Loading…
Reference in New Issue