leochabi / selenium-vba

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

compare 2 images and return a boolean #74

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 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 8 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 8 years ago

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