]> git.parisson.com Git - pdf.js.git/commitdiff
band-aid lack of Indexed color space
authorChris Jones <jones.chris.g@gmail.com>
Wed, 22 Jun 2011 09:10:08 +0000 (02:10 -0700)
committerChris Jones <jones.chris.g@gmail.com>
Wed, 22 Jun 2011 09:10:08 +0000 (02:10 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 19fa125ca33e2eeded2effc151f158750e48703d..85ee20da6951f59176b8f766118bc4ef0412880e 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -3419,8 +3419,18 @@ var ColorSpace = (function() {
                 this.dict = dict;
                 this.numComps = dict.get("N");
                 break;
+            case "Indexed":
+                this.stream = stream;
+                this.dict = stream.dict;
+                var base = cs[1];
+                var hival = cs[2];
+                assertWellFormed(0 <= hival && hival <= 255, "hival in range");
+                var lookupTable = cs[3];
+                TODO("implement 'Indexed' color space");
+                this.numComps = 3; // HACK
+                break;
             default:
-                error("unrecognized color space object");
+                error("unrecognized color space object '"+ mode +"'");
             }
         } else {
             error("unrecognized color space object");