Package org.netbeans.jemmy.image
Class RoughImageComparator
- java.lang.Object
-
- org.netbeans.jemmy.image.RoughImageComparator
-
- All Implemented Interfaces:
ImageComparator
public class RoughImageComparator extends Object implements ImageComparator
Compares two images roughly (i.e. not all of the pixel colors should match).- Author:
- Alexandre Iline (alexandre.iline@sun.com)
-
-
Constructor Summary
Constructors Constructor Description RoughImageComparator(double roughness)
Creates a comparator withroughness
allowed roughness.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compare(BufferedImage image1, BufferedImage image2)
Compares two images with allowed roughness.
-
-
-
Method Detail
-
compare
public boolean compare(BufferedImage image1, BufferedImage image2)
Compares two images with allowed roughness.- Specified by:
compare
in interfaceImageComparator
- Parameters:
image1
- an image to compare.image2
- an image to compare.- Returns:
- true if images have the same sizes and
number of unmatching pixels less or equal to
image1.getWidth() * image1.getHeight() * roughness
-
-