nimiq / qr-scanner

Lightweight Javascript QR Code Scanner
https://nimiq.github.io/qr-scanner/demo
MIT License
2.35k stars 509 forks source link

[scanImage Method] Can't scan with Diamond,Heart and Dot patterns QR Codes. #254

Open Janith-Umeda opened 1 month ago

Janith-Umeda commented 1 month ago

Hello, I am tring to create qr scannability measure feature using this library.(programatically scanning the generated qr code). Unforunatley I have faced this problem. Unable to detect these types of qr codes to this library.

This is what i had tried to scan.

diamond-pattern diamond-pattern diamond-pattern

This is the code that i used to scan the qr code as a file

const tempQrFile = dataURLtoFile('data:image/svg+xml;base64,...');
QrScanner.scanImage(tempQrFile,{ returnDetailedScanResult: true })
.then((res)=>{
     //can scan
}).catch((err)=>{
     //can't scan
});

Is there any way to fix this problem ?