diff --git a/lib/qr.ts b/lib/qr.ts index b868097..c881c5d 100644 --- a/lib/qr.ts +++ b/lib/qr.ts @@ -48,6 +48,8 @@ class QrcodeDecoder { } 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); const imageData = this.gCtx!.getImageData(