From: Julian Viereck Date: Fri, 21 Oct 2011 07:42:44 +0000 (+0200) Subject: Fix imageObj.imageMask bug from merge X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b873c1f4da297c4d4b1bd743d6d28a975fe75c65;p=pdf.js.git Fix imageObj.imageMask bug from merge --- diff --git a/pdf.js b/pdf.js index b1d6107..d1574ac 100644 --- a/pdf.js +++ b/pdf.js @@ -6057,13 +6057,13 @@ var CanvasGraphics = (function canvasGraphics() { var tmpCanvas = new this.ScratchCanvas(w, h); var tmpCtx = tmpCanvas.getContext('2d'); - if (imageObj.imageMask) { - var fillColor = this.current.fillColor; - tmpCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') && - fillColor.type === 'Pattern') ? - fillColor.getPattern(tmpCtx) : fillColor; - tmpCtx.fillRect(0, 0, w, h); - } + + var fillColor = this.current.fillColor; + tmpCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') && + fillColor.type === 'Pattern') ? + fillColor.getPattern(tmpCtx) : fillColor; + tmpCtx.fillRect(0, 0, w, h); + var imgData = tmpCtx.getImageData(0, 0, w, h); var pixels = imgData.data;