Correctly return image buffer to resolve #2124
This commit is contained in:
parent
c4d19e5fdd
commit
cbad5ac0fe
@ -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.");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user