We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
Works for me with jsqr@^1.4.0 and upng-js@^2.1.0 as a helper (since this is a test):
jsqr@^1.4.0
upng-js@^2.1.0
const pngBuffer = fs.readFileSync( "tests/unit/src/views/data/115042899-92ee0c00-9edc-11eb-9a4b-b0298453765d.png" ); const pngData: upng.Image = upng.decode(pngBuffer); const qrArray = new Uint8ClampedArray(upng.toRGBA8(pngData)[0]); const mockImageData: ImageData = { data: qrArray, height: 1125, width: 576 }; ... const code = jsQR( mockImageData.data, mockImageData.width, mockImageData.height ); if (code) { console.log("Found QR code", code); }
Found QR code { binaryData: [ 104, 116, 116, 112, 115, 58, 47, 47, 97, 98, 99, 46, 107, 111, 110, 122, 111, 46, 120, 121, 122, 47 ], data: 'https://abc.konzo.xyz/', chunks: [ { type: 'byte', bytes: [Array], text: 'https://abc.konzo.xyz/' } ], version: 3, location: { topRightCorner: { x: 346, y: 865 }, topLeftCorner: { x: 230, y: 865 }, bottomRightCorner: { x: 346, y: 981 }, bottomLeftCorner: { x: 230, y: 981 }, topRightFinderPattern: { x: 332, y: 879 }, topLeftFinderPattern: { x: 244, y: 879 }, bottomLeftFinderPattern: { x: 244, y: 967 }, bottomRightAlignmentPattern: { x: 320, y: 955 } } }
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: