ImageComparer.Compare – metoda (Image, Image, Image%)
Porovná dva obrazy zkontrolovat, zda jsou stejné a vypočítá rozdíl mezi dvěma obrazy jako obraz změn.
Obor názvů: Microsoft.VisualStudio.TestTools.UITesting
Sestavení: Microsoft.VisualStudio.TestTools.UITesting (v Microsoft.VisualStudio.TestTools.UITesting.dll)
Syntaxe
'Deklarace
Public Shared Function Compare ( _
actualImage As Image, _
expectedImage As Image, _
<OutAttribute> ByRef diffImage As Image _
) As Boolean
public static bool Compare(
Image actualImage,
Image expectedImage,
out Image diffImage
)
public:
static bool Compare(
Image^ actualImage,
Image^ expectedImage,
[OutAttribute] Image^% diffImage
)
static member Compare :
actualImage:Image *
expectedImage:Image *
diffImage:Image byref -> bool
public static function Compare(
actualImage : Image,
expectedImage : Image,
diffImage : Image
) : boolean
Parametry
- actualImage
Typ: System.Drawing.Image
Vlastní obraz.
- expectedImage
Typ: System.Drawing.Image
Očekávané obrazu.
- diffImage
Typ: System.Drawing.Image%
Obraz, jehož argb hodnoty představují rozdíl mezi dvěma obrazy.
Vrácená hodnota
Typ: System.Boolean
PRAVDA, pokud dva obrazy jsou stejné.
Zabezpečení rozhraní .NET Framework
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.