pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1832331 - /pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java
Date Sun, 27 May 2018 11:56:47 GMT
Author: tilman
Date: Sun May 27 11:56:47 2018
New Revision: 1832331

URL: http://svn.apache.org/viewvc?rev=1832331&view=rev
Log:
PDFBOX-4184: add encoding test with file that failed in development test

Modified:
    pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java

Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java?rev=1832331&r1=1832330&r2=1832331&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/LosslessFactoryTest.java
Sun May 27 11:56:47 2018
@@ -250,6 +250,20 @@ public class LosslessFactoryTest extends
     }
 
     /**
+     * Test file that had a predictor encoding bug in PDFBOX-4184.
+     *
+     * @throws java.io.IOException
+     */
+    public void testCreateLosslessFromGovdocs032163() throws IOException
+    {
+        PDDocument document = new PDDocument();
+        BufferedImage image = ImageIO.read(new File("target/imgs", "PDFBOX-4184-032163.jpg"));
+        PDImageXObject ximage = LosslessFactory.createFromImage(document, image);
+        validate(ximage, 8, image.getWidth(), image.getHeight(), "png", PDDeviceRGB.INSTANCE.getName());
+        checkIdent(image, ximage.getImage());
+    }
+
+    /**
      * Check whether the RGB part of images are identical.
      *
      * @param expectedImage



Mime
View raw message