ImageComparer.Compare 方法 (Image, Image, ColorDifference)
根據整個影像的容限值,比較兩個影像。
命名空間: 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 _
) 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
參數
- actualImage
型別:System.Drawing.Image
實際影像。
- expectedImage
型別:System.Drawing.Image
預期的影像。
- argbTolerance
型別:Microsoft.VisualStudio.TestTools.UITesting.ColorDifference
這兩個影像的 argb 之間的最大核准的差異。
傳回值
型別:System.Boolean
為 True,如果兩個影像) 會在指定的容錯因數較少的數量不同。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。