We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c90c83 + 88d496a commit e6b3e09Copy full SHA for e6b3e09
dist/jspdf.debug.js
@@ -4476,8 +4476,7 @@ var jsPDF = (function(global) {
4476
*/
4477
if(img.bits === 8) {
4478
4479
- var pixelsArrayType = window['Uint' + img.pixelBitlength + 'Array'],
4480
- pixels = new pixelsArrayType(img.decodePixels().buffer),
+ var pixels = img.pixelBitlength == 32 ? new Uint32Array(img.decodePixels().buffer) : img.pixelBitlength == 16 ? new Uint16Array(img.decodePixels().buffer) : new Uint8Array(img.decodePixels().buffer),
4481
len = pixels.length,
4482
imgData = new Uint8Array(len * img.colors),
4483
alphaData = new Uint8Array(len),
0 commit comments