pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1826134 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
Date Wed, 07 Mar 2018 17:08:34 GMT
Author: tilman
Date: Wed Mar  7 17:08:34 2018
New Revision: 1826134

URL: http://svn.apache.org/viewvc?rev=1826134&view=rev
Log:
PDFBOX-4071: remove unused code, similar to suggestion by Itai Shaked for JBIG2Filter

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java?rev=1826134&r1=1826133&r2=1826134&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
Wed Mar  7 17:08:34 2018
@@ -37,9 +37,6 @@ final class CCITTFaxFilter extends Filte
     public DecodeResult decode(InputStream encoded, OutputStream decoded,
                                          COSDictionary parameters, int index) throws IOException
     {
-        DecodeResult result = new DecodeResult(new COSDictionary());
-        result.getParameters().addAll(parameters);
-
         // get decode parameters
         COSDictionary decodeParms = getDecodeParams(parameters, index);
 
@@ -101,12 +98,6 @@ final class CCITTFaxFilter extends Filte
             invertBitmap(decompressed);
         }
 
-        // repair missing color space
-        if (!parameters.containsKey(COSName.COLORSPACE))
-        {
-            result.getParameters().setItem(COSName.COLORSPACE, COSName.DEVICEGRAY);
-        }
-
         decoded.write(decompressed);
         return new DecodeResult(parameters);
     }



Mime
View raw message