ImageComparer.Compare 方法 (Image, Image, ColorDifference, Image%)

基于整个图像的容错值比较两幅图像。

命名空间:  Microsoft.VisualStudio.TestTools.UITesting
程序集:  Microsoft.VisualStudio.TestTools.UITesting(在 Microsoft.VisualStudio.TestTools.UITesting.dll 中)

语法

声明
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

参数

返回值

类型:System.Boolean
True,如果两个图像由比指定的、位于的数量不同。

.NET Framework 安全性

请参见

参考

ImageComparer 类

Compare 重载

Microsoft.VisualStudio.TestTools.UITesting 命名空间