diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-07-25 10:55:49 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-07-25 10:55:49 +0000 |
commit | d058e870151a49af34ec1e7204edd0ffc64aaefc (patch) | |
tree | 14c346af79c0d2207f98b17e1e9f0212c8c32f44 /test/java/org/apache/fop/visual/BitmapComparator.java | |
parent | cc5d6604bde87fca098633ceccd66fc92808bddc (diff) | |
download | xmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.tar.gz xmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.zip |
Merged revisions 679052-679352 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r679060 | acumiskey | 2008-07-23 11:39:11 +0100 (Wed, 23 Jul 2008) | 2 lines
My bad.. copy paste error I introduced which broke forrest.
........
r679164 | jeremias | 2008-07-23 20:33:24 +0100 (Wed, 23 Jul 2008) | 1 line
Only update the generated files if any source file is newer than the generated ones.
........
r679326 | vhennebert | 2008-07-24 10:35:34 +0100 (Thu, 24 Jul 2008) | 2 lines
Fed up with all those trailing whitespaces. Let's remove them all (once... and for all?)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@679758 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/visual/BitmapComparator.java')
-rw-r--r-- | test/java/org/apache/fop/visual/BitmapComparator.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/java/org/apache/fop/visual/BitmapComparator.java b/test/java/org/apache/fop/visual/BitmapComparator.java index 70a627d7e..650554f37 100644 --- a/test/java/org/apache/fop/visual/BitmapComparator.java +++ b/test/java/org/apache/fop/visual/BitmapComparator.java @@ -39,8 +39,8 @@ import org.apache.commons.io.IOUtils; /** * Helper class to visually compare two bitmap images. * <p> - * This class was created by extracting reusable code from - * org.apache.batik.test.util.ImageCompareText (Apache Batik) + * This class was created by extracting reusable code from + * org.apache.batik.test.util.ImageCompareText (Apache Batik) * into this separate class. * <p> * TODO Move as utility class to XML Graphics Commons when possible @@ -51,7 +51,7 @@ public class BitmapComparator { * Builds a new BufferedImage that is the difference between the two input images * @param ref the reference bitmap * @param gen the newly generated bitmap - * @return the diff bitmap + * @return the diff bitmap */ public static BufferedImage buildDiffImage(BufferedImage ref, BufferedImage gen) { @@ -104,7 +104,7 @@ public class BitmapComparator { ColorModel cm = gen.getColorModel(); cm = GraphicsUtil.coerceData(genWR, cm, false); } - + if (!refPre) { ColorModel cm = ref.getColorModel(); cm = GraphicsUtil.coerceData(refWR, cm, false); @@ -114,14 +114,14 @@ public class BitmapComparator { } /** - * Builds a combined image that places a number of images next to each other for - * manual, visual comparison. + * Builds a combined image that places a number of images next to each other for + * manual, visual comparison. * @param images the array of bitmaps * @return the combined image */ public static BufferedImage buildCompareImage(BufferedImage[] images) { BufferedImage cmp = new BufferedImage( - images[0].getWidth() * images.length, + images[0].getWidth() * images.length, images[0].getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics2D g = cmp.createGraphics(); @@ -145,8 +145,8 @@ public class BitmapComparator { } /** - * Builds a combined image that places two images next to each other for - * manual, visual comparison. + * Builds a combined image that places two images next to each other for + * manual, visual comparison. * @param ref the reference image * @param gen the actual image * @return the combined image @@ -155,7 +155,7 @@ public class BitmapComparator { BufferedImage gen) { return buildCompareImage(new BufferedImage[] {ref, gen}); } - + /** * Loads an image from a URL * @param url the URL to the image @@ -173,7 +173,7 @@ public class BitmapComparator { if (red == null) { return null; } - + BufferedImage img = new BufferedImage(red.getWidth(), red.getHeight(), BufferedImage.TYPE_INT_ARGB); @@ -192,7 +192,7 @@ public class BitmapComparator { InputStream in = new java.io.FileInputStream(bitmapFile); try { in = new java.io.BufferedInputStream(in); - + ImageTagRegistry reg = ImageTagRegistry.getRegistry(); Filter filt = reg.readStream(in); if (filt == null) { @@ -203,7 +203,7 @@ public class BitmapComparator { if (red == null) { return null; } - + BufferedImage img = new BufferedImage(red.getWidth(), red.getHeight(), BufferedImage.TYPE_INT_ARGB); |