pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1571126 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
Date Mon, 24 Feb 2014 02:07:52 GMT
Author: jahewson
Date: Mon Feb 24 02:07:51 2014
New Revision: 1571126

URL: http://svn.apache.org/r1571126
Log:
Clean Up

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java?rev=1571126&r1=1571125&r2=1571126&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDIndexed.java
Mon Feb 24 02:07:51 2014
@@ -171,7 +171,6 @@ public final class PDIndexed extends PDS
         BufferedImage rgbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
         WritableRaster rgbRaster = rgbImage.getRaster();
 
-        final int hival = gettHival();
         int[] src = new int[1];
         for (int y = 0; y < height; y++)
         {
@@ -179,11 +178,8 @@ public final class PDIndexed extends PDS
             {
                 raster.getPixel(x, y, src);
 
-                // scale to 0..1
-                //src[0] = src[0] / 255f;
-
-                // scale to 0..hival and lookup
-                int index = Math.min(src[0], actualMaxIndex);  //         ARRRRRGH WHY WONT
ALTONA P9 WORK!?!?!?!
+                // lookup
+                int index = Math.min(src[0], actualMaxIndex);
                 rgbRaster.setPixel(x, y, rgbColorTable[index]);
             }
         }



Mime
View raw message