pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1601875 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java
Date Wed, 11 Jun 2014 12:44:55 GMT
Author: tilman
Date: Wed Jun 11 12:44:54 2014
New Revision: 1601875

URL: http://svn.apache.org/r1601875
Log:
PDFBOX-2128: add parameter directJPEG to force 1:1 extraction of JPEGs

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java?rev=1601875&r1=1601874&r2=1601875&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/ExtractImages.java Wed Jun
11 12:44:54 2014
@@ -55,6 +55,14 @@ public class ExtractImages
     private static final String NONSEQ = "-nonSeq";
     private static final String DIRECTJPEG = "-directJPEG";
 
+    private static final List<String> DCT_FILTERS = new ArrayList<String>();
+
+    static
+    {
+        DCT_FILTERS.add( COSName.DCT_DECODE.getName() );
+        DCT_FILTERS.add( COSName.DCT_DECODE_ABBREVIATION.getName() );
+    }
+
     private ExtractImages()
     {
     }
@@ -185,10 +193,6 @@ public class ExtractImages
     
     public void writeJpeg2file(PDJpeg image, String filename) throws IOException
     {
-        final List<String> DCT_FILTERS = new ArrayList<String>();
-        DCT_FILTERS.add(COSName.DCT_DECODE.getName());
-        DCT_FILTERS.add(COSName.DCT_DECODE_ABBREVIATION.getName());
-
         FileOutputStream out = null;
         
         try



Mime
View raw message