Udostępnij za pośrednictwem


Metoda ImageComparer.Compare — (Image, Image, Image%)

Porównuje dwa obrazy, aby sprawdzić, czy są takie same i oblicza różnicę między dwoma obrazami jako obrazu różnicowego.

Przestrzeń nazw:  Microsoft.VisualStudio.TestTools.UITesting
Zestaw:  Microsoft.VisualStudio.TestTools.UITesting (w Microsoft.VisualStudio.TestTools.UITesting.dll)

Składnia

'Deklaracja
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

  • diffImage
    Typ: System.Drawing.Image%
    Obraz, którego wartości argb reprezentują różnica między dwoma obrazami.

Wartość zwracana

Typ: System.Boolean
PRAWDA, jeśli dwa obrazy są takie same.

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

ImageComparer Klasa

Przeciążenie Compare

Przestrzeń nazw Microsoft.VisualStudio.TestTools.UITesting