Class RoughImageComparator
java.lang.Object
org.netbeans.jemmy.image.RoughImageComparator
- All Implemented Interfaces:
ImageComparator
Compares two images roughly (i.e. not all of the pixel colors should match).
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
-
Constructor Summary
ConstructorsConstructorDescriptionRoughImageComparator(double roughness) Creates a comparator withroughnessallowed roughness. -
Method Summary
Modifier and TypeMethodDescriptionbooleancompare(BufferedImage image1, BufferedImage image2) Compares two images with allowed roughness.
-
Constructor Details
-
RoughImageComparator
public RoughImageComparator(double roughness) Creates a comparator withroughnessallowed roughness.- Parameters:
roughness- Allowed comparision roughness.
-
-
Method Details
-
compare
Compares two images with allowed roughness.- Specified by:
comparein 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
-