You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/03/13 08:23:23 UTC
svn commit: r1577046 -
/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java
Author: tilman
Date: Thu Mar 13 07:23:23 2014
New Revision: 1577046
URL: http://svn.apache.org/r1577046
Log:
PDFBOX-1977: check resolution of JPEG and BMP files; WBMP files are bitonal
Modified:
pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java
Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java?rev=1577046&r1=1577045&r2=1577046&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java Thu Mar 13 07:23:23 2014
@@ -75,13 +75,12 @@ public class TestImageIOUtils extends Te
// testing JPG/JPEG
imageType = "jpg";
writeImage(document, imageType, outDir + file.getName() + "-", ImageType.RGB, dpi);
- //TODO this one doesn't save the meta data
+ checkResolution(outDir + file.getName() + "-1." + imageType, (int) dpi);
// testing BMP
imageType = "bmp";
writeImage(document, imageType, outDir + file.getName() + "-", ImageType.RGB, dpi);
- //TODO sometimes empty, sometimes correct?????
- //checkResolution(outDir + file.getName() + "-1." + imageType, (int) dpi);
+ checkResolution(outDir + file.getName() + "-1." + imageType, (int) dpi);
// testing GIF
imageType = "gif";
@@ -90,9 +89,9 @@ public class TestImageIOUtils extends Te
//checkResolution(outDir + file.getName() + "-1." + imageType, (int) dpi);
// testing WBMP
- //TODO this doesn't work at all, am empty image is always created
imageType = "wbmp";
- writeImage(document, imageType, outDir + file.getName() + "-", ImageType.RGB, dpi);
+ writeImage(document, imageType, outDir + file.getName() + "-", ImageType.BINARY, dpi);
+ //TODO check that it isn't empty, i.e. that a real image is created
// testing TIFF
imageType = "tif";