From 4b31e7249e0373035b91b930498d9fb579329e58 Mon Sep 17 00:00:00 2001 From: 13thirteen Date: Thu, 5 Dec 2019 18:28:23 +0100 Subject: [PATCH] Return the extracted BitMatrix as additional property `matrix` of the result (Allows the caller to reproduce an exact copy of the read QR code) --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 65116049..6bdbc3c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,7 @@ export interface QRCode { bottomRightAlignmentPattern?: Point; }; + matrix: BitMatrix; } function scan(matrix: BitMatrix): QRCode | null { @@ -51,6 +52,7 @@ function scan(matrix: BitMatrix): QRCode | null { bottomRightAlignmentPattern: location.alignmentPattern, }, + matrix: extracted.matrix, }; }