pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1670780 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
Date Wed, 01 Apr 2015 22:01:19 GMT
Author: tilman
Date: Wed Apr  1 22:01:19 2015
New Revision: 1670780

URL: http://svn.apache.org/r1670780
Log:
PDFBOX-2743: use base array; override getCOSObject to return array

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java?rev=1670780&r1=1670779&r2=1670780&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
Wed Apr  1 22:01:19 2015
@@ -52,8 +52,6 @@ public class PDIndexed extends PDColorSp
      */
     public static final String ABBREVIATED_NAME = "I";
 
-    private COSArray array;
-
     private PDColorSpace baseColorspace = null;
     private ColorModel baseColorModel = null;
 
@@ -93,6 +91,12 @@ public class PDIndexed extends PDColorSp
         array = indexedArray;
     }
 
+    @Override
+    public COSBase getCOSObject()
+    {
+        return array;
+    }
+    
     /**
      * This will return the number of color components. This will return the number of color
components in the base
      * color.
@@ -312,7 +316,7 @@ public class PDIndexed extends PDColorSp
             colorValues = new float[indexNumOfComponents];
             for (int i = 0; i < indexNumOfComponents; i++)
             {
-                colorValues[i] = (float) indexedColorValues[bufferIndex + i];
+                colorValues[i] = indexedColorValues[bufferIndex + i];
             }
         }
         return colorValues;



Mime
View raw message