pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1783134 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Wed, 15 Feb 2017 18:00:08 GMT
Author: tilman
Date: Wed Feb 15 18:00:08 2017
New Revision: 1783134

URL: http://svn.apache.org/viewvc?rev=1783134&view=rev
Log:
PDFBOX-3686: adjust color values to be in 0..1 interval

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1783134&r1=1783133&r2=1783134&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Wed
Feb 15 18:00:08 2017
@@ -265,7 +265,7 @@ public class PageDrawer extends PDFGraph
         if (!(colorSpace instanceof PDPattern))
         {
             float[] rgb = colorSpace.toRGB(color.getComponents());
-            return new Color(rgb[0], rgb[1], rgb[2]);
+            return new Color(clampColor(rgb[0]), clampColor(rgb[1]), clampColor(rgb[2]));
         }
         else
         {



Mime
View raw message