sagarpabba / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 0 forks source link

compare 2 images and return a boolean #74

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system : win 7
.Net Framework version : 4
Office Version : 2010
SeleniumWrapper version :

What is your issue ?

Hello i have used the code: 

imageA.CompareTo(imageB)

but this returns an image, is it possible to return a boolean if they are 
similar 

Thanks

Thanks

Original issue reported on code.google.com by alam...@gmail.com on 26 Jun 2014 at 9:30

GoogleCodeExporter commented 9 years ago
You can use the DiffCount property that holds the counts of non matching pixels:

imageDiff = imageA.CompareTo(imageB)
diffCount = imageDiff.DiffCount
If diffCount <> 0 Then
   ...

Original comment by florentbr on 26 Jun 2014 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40