[Pkg-javascript-commits] [pdf.js] 194/204: Fixes decoding for CMYK jpegs.
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 2d7a34d692a8a26348e27c7dd584729711029f2d
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Wed Oct 15 15:56:29 2014 -0500
Fixes decoding for CMYK jpegs.
---
src/core/stream.js | 2 +-
test/pdfs/bug1072164.pdf.link | 1 +
test/test_manifest.json | 8 ++++++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/core/stream.js b/src/core/stream.js
index bd24473..a842956 100644
--- a/src/core/stream.js
+++ b/src/core/stream.js
@@ -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;
diff --git a/test/pdfs/bug1072164.pdf.link b/test/pdfs/bug1072164.pdf.link
new file mode 100644
index 0000000..c3868f6
--- /dev/null
+++ b/test/pdfs/bug1072164.pdf.link
@@ -0,0 +1 @@
+https://bugzilla.mozilla.org/attachment.cgi?id=8494369
diff --git a/test/test_manifest.json b/test/test_manifest.json
index 45de838..4d21659 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -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",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list