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

Decode more jpegs using the browser if possible.

This commit is contained in:
Brendan Dahl 2012-01-03 14:26:19 -08:00
parent c0cf081ec0
commit 3c2a0f11b1
3 changed files with 36 additions and 22 deletions

View file

@ -9,7 +9,7 @@ var PDFImage = (function PDFImageClosure() {
* when the image data is ready.
*/
function handleImageData(handler, xref, res, image, promise) {
if (image instanceof JpegStream && image.isNative) {
if (image instanceof JpegStream && image.isNativelyDecodable(xref, res)) {
// For natively supported jpegs send them to the main thread for decoding.
var dict = image.dict;
var colorSpace = dict.get('ColorSpace', 'CS');