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

Address Julian's comments.

This commit is contained in:
Brendan Dahl 2011-12-12 15:09:05 -08:00
parent fcd612e486
commit 94a48cab82
4 changed files with 18 additions and 9 deletions

View file

@ -636,10 +636,10 @@ var PDFDoc = (function PDFDocClosure() {
var size = width * height;
var rgbaLength = size * 4;
var buf = new Uint8Array(size * components);
var tempCanvas = new ScratchCanvas(width, height);
var tempCtx = tempCanvas.getContext('2d');
tempCtx.drawImage(img, 0, 0);
var data = tempCtx.getImageData(0, 0, width, height).data;
var tmpCanvas = new ScratchCanvas(width, height);
var tmpCtx = tmpCanvas.getContext('2d');
tmpCtx.drawImage(img, 0, 0);
var data = tmpCtx.getImageData(0, 0, width, height).data;
if (components == 3) {
for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {