You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2023/05/14 14:26:01 UTC

svn commit: r1909819 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java

Author: tilman
Date: Sun May 14 14:26:00 2023
New Revision: 1909819

URL: http://svn.apache.org/viewvc?rev=1909819&view=rev
Log:
PDFBOX-4892: optimize, as suggested by valerybokov

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java?rev=1909819&r1=1909818&r2=1909819&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java Sun May 14 14:26:00 2023
@@ -155,9 +155,7 @@ public class PDSeparation extends PDSpec
         // use the tint transform to convert the sample into
         // the alternate color space (this is usually 1:many)
         WritableRaster altRaster = Raster.createBandedRaster(DataBuffer.TYPE_BYTE,
-                raster.getWidth(), raster.getHeight(),
-                alternateColorSpace.getNumberOfComponents(),
-                new Point(0, 0));
+                raster.getWidth(), raster.getHeight(), numAltComponents, new Point(0, 0));
 
         int width = raster.getWidth();
         int height = raster.getHeight();