xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lberna...@apache.org
Subject svn commit: r1570941 - /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
Date Sat, 22 Feb 2014 23:30:46 GMT
Author: lbernardo
Date: Sat Feb 22 23:30:46 2014
New Revision: 1570941

URL: http://svn.apache.org/r1570941
Log:
FOP-2340: 64bit image missing in pdf; patch submitted by Simon Steiner

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java?rev=1570941&r1=1570940&r2=1570941&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
Sat Feb 22 23:30:46 2014
@@ -164,10 +164,9 @@ public class ImageEncodingHelper {
         ColorModel colorModel = image.getColorModel();
         int w = image.getWidth();
         int h = image.getHeight();
-
-        int numDataElements = raster.getNumDataElements();
-        if (numDataElements > 1 || !outputbw || nbands > 1) {
-            numDataElements = 3;
+        int numDataElements = 3;
+        if (colorModel.getPixelSize() == 1 && outputbw) {
+            numDataElements = 1;
         }
 
         byte[] buf = new byte[w * numDataElements];



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message