pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1580443 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics: color/PDDeviceGray.java image/LosslessFactory.java
Date Sun, 23 Mar 2014 04:31:50 GMT
Author: tilman
Date: Sun Mar 23 04:31:50 2014
New Revision: 1580443

URL: http://svn.apache.org/r1580443
Log:
PDFBOX-1990: activate direct encoding of TYPE_BYTE_GRAY lossless images now that test works
thanks to fix of PDDeviceGray (PDFBOX-1993 and PDFBOX-1955); removed unused imports in PDDeviceGray.

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceGray.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactory.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceGray.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceGray.java?rev=1580443&r1=1580442&r2=1580443&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceGray.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceGray.java
Sun Mar 23 04:31:50 2014
@@ -18,16 +18,7 @@ package org.apache.pdfbox.pdmodel.graphi
 
 import org.apache.pdfbox.cos.COSName;
 
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.color.ColorSpace;
 import java.awt.image.BufferedImage;
-import java.awt.image.ColorConvertOp;
-import java.awt.image.ColorModel;
-import java.awt.image.ComponentColorModel;
-import java.awt.image.DataBuffer;
-import java.awt.image.IndexColorModel;
-import java.awt.Transparency;
 import java.awt.image.WritableRaster;
 import java.io.IOException;
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactory.java?rev=1580443&r1=1580442&r2=1580443&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactory.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactory.java
Sun Mar 23 04:31:50 2014
@@ -58,10 +58,8 @@ public class LosslessFactory
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
 
-        //TODO: using the grayscale branch for BufferedImage.TYPE_BYTE_GRAY
-        // fails the test. We use the RGB branch instead until this is fixed.
-        if ((//image.getType() == BufferedImage.TYPE_BYTE_GRAY || 
-                image.getType() == BufferedImage.TYPE_BYTE_BINARY)
+        if ((image.getType() == BufferedImage.TYPE_BYTE_GRAY
+                || image.getType() == BufferedImage.TYPE_BYTE_BINARY)
                 && image.getColorModel().getPixelSize() <= 8)
         {
             MemoryCacheImageOutputStream mcios = new MemoryCacheImageOutputStream(bos);



Mime
View raw message