 | ValidateCompareImage Method (Bitmap, Bitmap, ImagingFindOptions, String, ValidateOptions) |
Compares two images to validate if they match within specified tolerance.
Namespace:
Ranorex
Assembly:
Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntaxpublic static bool CompareImage(
Bitmap expected,
Bitmap current,
ImagingFindOptions findOptions,
string message,
ValidateOptions options
)
Public Shared Function CompareImage (
expected As Bitmap,
current As Bitmap,
findOptions As ImagingFindOptions,
message As String,
options As ValidateOptions
) As Boolean
Parameters
- expected
- Type: System.DrawingBitmap
The reference image to compare against. - current
- Type: System.DrawingBitmap
The image to validate against the reference. - findOptions
- Type: RanorexImagingFindOptions
A ImagingFindOptions instance that defines the options
for the comparison. - message
- Type: SystemString
The message to log. "{0}" is replaced by the string
representation of the expected. - options
- Type: RanorexValidateOptions
Additional ValidateOptions for this validation action.
Return Value
Type:
BooleanTrue if the specified
current matches the
screenshot of the
expected; otherwise
false.
Exceptions
See Also