1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Fixes decoding for CMYK jpegs.

This commit is contained in:
Yury Delendik 2014-10-15 15:56:29 -05:00
parent 406bdc0862
commit 2d7a34d692
3 changed files with 10 additions and 1 deletions

View file

@ -884,7 +884,7 @@ var JpegStream = (function JpegStreamClosure() {
var jpegImage = new JpegImage();
// checking if values needs to be transformed before conversion
if (this.dict && isArray(this.dict.get('Decode'))) {
if (this.forceRGB && this.dict && isArray(this.dict.get('Decode'))) {
var decodeArr = this.dict.get('Decode');
var bitsPerComponent = this.dict.get('BitsPerComponent') || 8;
var decodeArrLength = decodeArr.length;