Click or drag to resize
Ranorex

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
Syntax
public static bool Compare(
	Bitmap imageA,
	Bitmap imageB,
	double similarity
)

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: Boolean
True if the similarity of the two images is greater than or equal to similarity.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf imageA is null.
ArgumentNullExceptionIf imageB is null.
ArgumentExceptionIf the bitmap format of the imageB cannot be converted to that of the imageA.
Remarks
False 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