Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ImageComparer::Compare Method (Image^, Image^, List<ToleranceRectangle>^, Image^)

 

Compares specific regions of two images by the area specified by tolerance rectangles.

Returns true if the image difference is within tolerance, and computes the margin by which tolerance is missed as a diff image.

Namespace:   Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

public:
static bool Compare(
	Image^ actualImage,
	Image^ expectedImage,
	List<ToleranceRectangle>^ rectangleList,
	[OutAttribute] Image^% diffImage
)

Parameters

actualImage
Type: System.Drawing::Image^

Actual image.

expectedImage
Type: System.Drawing::Image^

Expected image.

rectangleList
Type: System.Collections.Generic::List<ToleranceRectangle>^

List of tolerance rectangles indicating area to compare and tolerance value.

diffImage
Type: System.Drawing::Image^

An image whose argb values represent the margin by which tolerance has been missed.

Return Value

Type: System::Boolean

True if the two images meet to values specified in tolerance rectangles.

Return to top
Show: