ImageComparer.Compare Method (Image, Image, ColorDifference, Image%)
Compares two images based on the tolerance value for whole image.
Namespace: Microsoft.VisualStudio.TestTools.UITesting
Assembly: Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)
Syntax
'Declaration
Public Shared Function Compare ( _
actualImage As Image, _
expectedImage As Image, _
argbTolerance As ColorDifference, _
<OutAttribute> ByRef diffImage As Image _
) As Boolean
public static bool Compare(
Image actualImage,
Image expectedImage,
ColorDifference argbTolerance,
out Image diffImage
)
public:
static bool Compare(
Image^ actualImage,
Image^ expectedImage,
ColorDifference^ argbTolerance,
[OutAttribute] Image^% diffImage
)
static member Compare :
actualImage:Image *
expectedImage:Image *
argbTolerance:ColorDifference *
diffImage:Image byref -> bool
public static function Compare(
actualImage : Image,
expectedImage : Image,
argbTolerance : ColorDifference,
diffImage : Image
) : boolean
Parameters
actualImage
Type: ImageActual image.
expectedImage
Type: ImageExpected image.
argbTolerance
Type: Microsoft.VisualStudio.TestTools.UITesting.ColorDifferenceMaximum approved difference between argb of the two images.
diffImage
Type: Image%An image whose argb values represent a margin by which tolerance has been missed.
Return Value
Type: Boolean
True if the two images differ by an amount that's less than the specified tolerance.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.