pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1596314 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java
Date Tue, 20 May 2014 17:01:53 GMT
Author: tilman
Date: Tue May 20 17:01:53 2014
New Revision: 1596314

URL: http://svn.apache.org/r1596314
Log:
PDFBOX-2067: added creation of PDFs

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java?rev=1596314&r1=1596313&r2=1596314&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java
Tue May 20 17:01:53 2014
@@ -56,7 +56,8 @@ public class JPEGFactoryTest extends Tes
         InputStream stream = JPEGFactoryTest.class.getResourceAsStream("jpeg.jpg");
         PDImageXObject ximage = JPEGFactory.createFromStream(document, stream);
         validate(ximage, 8, 344, 287, "jpg", PDDeviceRGB.INSTANCE.getName());
-        document.close();
+
+        doWritePDF(document, ximage, testResultsDir, "jpegrgbstream.pdf");
     }
 
     /**
@@ -69,7 +70,8 @@ public class JPEGFactoryTest extends Tes
         InputStream stream = JPEGFactoryTest.class.getResourceAsStream("jpeg256.jpg");
         PDImageXObject ximage = JPEGFactory.createFromStream(document, stream);
         validate(ximage, 8, 344, 287, "jpg", PDDeviceGray.INSTANCE.getName());
-        document.close();
+
+        doWritePDF(document, ximage, testResultsDir, "jpeg256stream.pdf");
     }
 
     /**
@@ -83,7 +85,8 @@ public class JPEGFactoryTest extends Tes
         assertEquals(3, image.getColorModel().getNumComponents());
         PDImageXObject ximage = JPEGFactory.createFromImage(document, image);
         validate(ximage, 8, 344, 287, "jpg", PDDeviceRGB.INSTANCE.getName());
-        document.close();
+
+        doWritePDF(document, ximage, testResultsDir, "jpegrgb.pdf");
     }
 
     /**
@@ -97,7 +100,8 @@ public class JPEGFactoryTest extends Tes
         assertEquals(1, image.getColorModel().getNumComponents());
         PDImageXObject ximage = JPEGFactory.createFromImage(document, image);
         validate(ximage, 8, 344, 287, "jpg", PDDeviceGray.INSTANCE.getName());
-        document.close();
+
+        doWritePDF(document, ximage, testResultsDir, "jpeg256.pdf");
     }
 
     /**



Mime
View raw message