ImageComparer.Compare Method (Image, Image, ColorDifference)

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 _
) As Boolean
public static bool Compare(
    Image actualImage,
    Image expectedImage,
    ColorDifference argbTolerance
)
public:
static bool Compare(
    Image^ actualImage, 
    Image^ expectedImage, 
    ColorDifference^ argbTolerance
)
static member Compare : 
        actualImage:Image * 
        expectedImage:Image * 
        argbTolerance:ColorDifference -> bool
public static function Compare(
    actualImage : Image, 
    expectedImage : Image, 
    argbTolerance : ColorDifference
) : boolean

Parameters

  • actualImage
    Type: Image

    Actual image.

  • expectedImage
    Type: Image

    Expected image.

Return Value

Type: Boolean
True if the two images differ by an amount that's less than the specified tolerance.

.NET Framework Security

See Also

Reference

ImageComparer Class

Compare Overload

Microsoft.VisualStudio.TestTools.UITesting Namespace