 | ImagingCompare Method (Bitmap, Bitmap, Double) |
Compares imageA and imageB and returns whether
their similarity is greater than or equal to similarity.
Namespace:
Ranorex
Assembly:
Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntaxpublic static bool Compare(
Bitmap imageA,
Bitmap imageB,
double similarity
)
Public Shared Function Compare (
imageA As Bitmap,
imageB As Bitmap,
similarity As Double
) As Boolean
Parameters
- imageA
- Type: System.DrawingBitmap
The first image. - imageB
- Type: System.DrawingBitmap
The second image. - similarity
- Type: SystemDouble
The minimum similarity of the two images in order
to return true.
Return Value
Type:
BooleanTrue if the similarity of the two images is greater than or equal
to
similarity.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | If imageA is null. |
| ArgumentNullException | If imageB is null. |
| ArgumentException | If the bitmap format of the imageB
cannot be converted to that of the imageA. |
RemarksFalse will be returned if the two images do not have the same size. If
similarity is smaller than or equal to zero, true is returned.
See Also