From 8ac26646f36268dd6b963676a3b193ffaafa36d8 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:27:25 +0000 Subject: [PATCH] Correctly return image buffer to resolve #2124 --- src/core/lib/QRCode.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/QRCode.mjs b/src/core/lib/QRCode.mjs index ccac4f295..0f8c7ce17 100644 --- a/src/core/lib/QRCode.mjs +++ b/src/core/lib/QRCode.mjs @@ -86,7 +86,7 @@ export function generateQrCode(input, format, moduleSize, margin, errorCorrectio case "PDF": return Utils.strToArrayBuffer(qrImage); case "PNG": - return qrImage.buffer; + return qrImage.buffer.slice(qrImage.byteOffset, qrImage.byteLength + qrImage.byteOffset); default: throw new OperationError("Unsupported QR code format."); }