mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Merge pull request #6134 from Snuffleupagus/ColorSpace-parseToIR-fetchIfRef
Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR
This commit is contained in:
commit
d504cde774
1 changed files with 3 additions and 3 deletions
|
@ -304,7 +304,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Pattern':
|
case 'Pattern':
|
||||||
var basePatternCS = xref.fetchIfRef(cs[1]) || null;
|
var basePatternCS = cs[1] || null;
|
||||||
if (basePatternCS) {
|
if (basePatternCS) {
|
||||||
basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
|
basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||||
case 'Indexed':
|
case 'Indexed':
|
||||||
case 'I':
|
case 'I':
|
||||||
var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res);
|
var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res);
|
||||||
var hiVal = cs[2] + 1;
|
var hiVal = xref.fetchIfRef(cs[2]) + 1;
|
||||||
var lookup = xref.fetchIfRef(cs[3]);
|
var lookup = xref.fetchIfRef(cs[3]);
|
||||||
if (isStream(lookup)) {
|
if (isStream(lookup)) {
|
||||||
lookup = lookup.getBytes();
|
lookup = lookup.getBytes();
|
||||||
|
@ -320,7 +320,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||||
return ['IndexedCS', baseIndexedCS, hiVal, lookup];
|
return ['IndexedCS', baseIndexedCS, hiVal, lookup];
|
||||||
case 'Separation':
|
case 'Separation':
|
||||||
case 'DeviceN':
|
case 'DeviceN':
|
||||||
var name = cs[1];
|
var name = xref.fetchIfRef(cs[1]);
|
||||||
numComps = 1;
|
numComps = 1;
|
||||||
if (isName(name)) {
|
if (isName(name)) {
|
||||||
numComps = 1;
|
numComps = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue