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:
parent
0910c5e68e
commit
d71c702dcf
5 changed files with 230 additions and 53 deletions
12
src/image.js
12
src/image.js
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue