From: Brendan Dahl Date: Wed, 9 Nov 2011 17:50:40 +0000 (-0800) Subject: Data is now created by jpg.js since we don't know the size. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b872a08f4fab9e36e4aad24e025a278178010f5c;p=pdf.js.git Data is now created by jpg.js since we don't know the size. --- diff --git a/external/jpgjs b/external/jpgjs index 592bec1..0d69fa8 160000 --- a/external/jpgjs +++ b/external/jpgjs @@ -1 +1 @@ -Subproject commit 592bec14658593fe90df1309926a38177889042e +Subproject commit 0d69fa8117fd72c58d85f8b0536d7eebd7b96c47 diff --git a/src/stream.js b/src/stream.js index 65e122a..69f792b 100644 --- a/src/stream.js +++ b/src/stream.js @@ -829,9 +829,7 @@ var JpegStream = (function jpegStream() { jpegImage.parse(this.bytes); var width = jpegImage.width; var height = jpegImage.height; - var dataLength = width * height * 4; - var data = new Uint8Array(dataLength); - jpegImage.getData(data, width, height, true); + var data = jpegImage.getData(width, height); this.buffer = data; this.bufferLength = data.length; };