Skip to content

Commit

Permalink
Merge pull request #5414 from yurydelendik/bug1072164
Browse files Browse the repository at this point in the history
Fixes decoding for CMYK jpegs.
  • Loading branch information
brendandahl committed Oct 15, 2014
2 parents 4e890b4 + 2d7a34d commit e9072ac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/bug1072164.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=8494369
8 changes: 8 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,14 @@
"rounds": 1,
"type": "eq"
},
{ "id": "bug1072164",
"file": "pdfs/bug1072164.pdf",
"md5": "cfee3c51e8464aa44218f4eaf27e084b",
"rounds": 1,
"link": true,
"type": "eq",
"about": "CMYK jpeg with mask"
},
{ "id": "bug886717",
"file": "pdfs/bug886717.pdf",
"md5": "8ba614192797a1324765610231a1bc9d",
Expand Down

0 comments on commit e9072ac

Please sign in to comment.