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:
Brendan Dahl 2011-12-18 17:18:36 -08:00
parent 74b66c0a7b
commit 87d72023dc
2 changed files with 49 additions and 22 deletions

View file

@ -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);
}