[Pkg-javascript-commits] [pdf.js] 10/72: Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
David Prévot
taffit at moszumanska.debian.org
Wed Mar 18 20:15:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 7c8996558aa5aaf447b1a57dae5f948eeffb7bc8
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Feb 20 11:19:21 2015 +0100
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
---
src/core/colorspace.js | 4 ++--
test/pdfs/.gitignore | 1 +
test/pdfs/issue5747.pdf | Bin 0 -> 112018 bytes
test/test_manifest.json | 7 +++++++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/core/colorspace.js b/src/core/colorspace.js
index 9381def..b6db086 100644
--- a/src/core/colorspace.js
+++ b/src/core/colorspace.js
@@ -275,10 +275,10 @@ var ColorSpace = (function ColorSpaceClosure() {
case 'CMYK':
return 'DeviceCmykCS';
case 'CalGray':
- params = cs[1].getAll();
+ params = xref.fetchIfRef(cs[1]).getAll();
return ['CalGrayCS', params];
case 'CalRGB':
- params = cs[1].getAll();
+ params = xref.fetchIfRef(cs[1]).getAll();
return ['CalRGBCS', params];
case 'ICCBased':
var stream = xref.fetchIfRef(cs[1]);
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 4ebc877..b68703e 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -76,6 +76,7 @@
!issue5470.pdf
!issue5501.pdf
!issue5599.pdf
+!issue5747.pdf
!gradientfill.pdf
!bug903856.pdf
!bug850854.pdf
diff --git a/test/pdfs/issue5747.pdf b/test/pdfs/issue5747.pdf
new file mode 100644
index 0000000..52eed4f
Binary files /dev/null and b/test/pdfs/issue5747.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index b9ba288..03afadd 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -1036,6 +1036,13 @@
"link": false,
"type": "eq"
},
+ { "id": "issue5747",
+ "file": "pdfs/issue5747.pdf",
+ "md5": "5c36afc931dd1a3321ffa2e88952d174",
+ "rounds": 1,
+ "link": false,
+ "type": "eq"
+ },
{ "id": "bug893730",
"file": "pdfs/bug893730.pdf",
"md5": "2587379fb1b3bbff89c14f0863e78383",
--
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