1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Removes "too many inline images" limit

This commit is contained in:
Yury Delendik 2012-12-07 12:19:43 -06:00
parent 0910c5e68e
commit d71c702dcf
5 changed files with 230 additions and 53 deletions

View file

@ -433,6 +433,18 @@ var PDFImage = (function PDFImageClosure() {
for (var i = 0; i < length; ++i)
buffer[i] = (scale * comps[i]) | 0;
},
getImageData: function PDFImage_getImageData() {
var drawWidth = this.drawWidth;
var drawHeight = this.drawHeight;
var imgData = {
width: drawWidth,
height: drawHeight,
data: new Uint8Array(drawWidth * drawHeight * 4)
};
var pixels = imgData.data;
this.fillRgbaBuffer(pixels, drawWidth, drawHeight);
return imgData;
},
getImageBytes: function PDFImage_getImageBytes(length) {
this.image.reset();
return this.image.getBytes(length);