Scale smask and image to the max dimensions of either one. Fix grayscale to scale the input value based on bpc.
This commit is contained in:
parent
74b66c0a7b
commit
87d72023dc
2 changed files with 49 additions and 22 deletions
|
@ -222,12 +222,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
|
||||
PDFImage.buildImage(function(imageObj) {
|
||||
var imgData = {
|
||||
width: w,
|
||||
height: h,
|
||||
data: new Uint8Array(w * h * 4)
|
||||
width: imageObj.maxWidth,
|
||||
height: imageObj.maxHeight,
|
||||
data: new Uint8Array(imageObj.maxWidth * imageObj.maxHeight * 4)
|
||||
};
|
||||
var pixels = imgData.data;
|
||||
imageObj.fillRgbaBuffer(pixels);
|
||||
imageObj.fillRgbaBuffer(pixels, imageObj.maxWidth, imageObj.maxHeight);
|
||||
handler.send('obj', [objId, 'Image', imgData]);
|
||||
}, handler, xref, resources, image, inline);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue