This project has moved and is read-only. For the latest updates, please go here.

Find subimage

Dec 2, 2013 at 11:30 AM

How can i find subimage with C# api?.
If i use image.Compare, "size differs" exception occurred.
MI version 6.8

The source code is following:
var currentWebpageScreenshot = webPage.TakeScreenshotAsFile();
using (var imageA = new MagickImage(currentWebpageScreenshot))
using (var imageB = new MagickImage(screenshotFile))
using (var differenceImage = new MagickImage())
    var comparisonResult = imageA.Compare(imageB, Metric.RootMeanSquareError, differenceImage); // Exception here
    // some logic
Thanks in advance.
Dec 2, 2013 at 11:51 AM
At this moment it is not possible to do a sub-image comparison. I would have to create an overload that will allow you to specify the starting point to start the comparison from.
Dec 2, 2013 at 11:52 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.