Compares the supplied images pixel by pixel, using NUnit Assert
methods.
Namespace:
NUnit.Extensions
Assembly:
NUnit.Extensions (in NUnit.Extensions.dll) Version: 0.1.3593.29695
Syntax
| C# |
|---|
public static void AreEqual(
Image expected,
Image actual,
int tolerance
) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub AreEqual ( _
expected As Image, _
actual As Image, _
tolerance As Integer _
) |
| Visual C++ |
|---|
public:
static void AreEqual(
Image^ expected,
Image^ actual,
int tolerance
) |
Parameters
- expected
- Type: System.Drawing..::.Image
The expected image.
- actual
- Type: System.Drawing..::.Image
The actual image.
- tolerance
- Type: System..::.Int32
Tolerance of differences in R, G or B values between corresponding
pixels in the two images.
For example, if tolerance is set to 5 then RGB( 255, 0, 255 ) and
RBG( 250, 5, 250 ) will count as the same colour but RGB( 0, 0, 0 )
and RBG( 0, 6, 0 ) will not.
Set to 0 to assert that all pixels are an exact colour match.
See Also