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

Image Comparison

Dec 17, 2013 at 10:13 AM
Is there an API to do an Image comparison. Something similar to the command prompt option as given below

compare bag_frame1.gif bag_frame2.gif compare.gif
Dec 17, 2013 at 12:01 PM
You can do this with the compare method:
using (MagickImage bagFrame1 = new MagickImage("bag_frame1.gif"))
{
  MagickImage compare = new MagickImage();
  MagickImage bagFrame2 = new MagickImage("bag_frame2.gif");
  bagFrame1.Compare(bagFrame2, Metric.Undefined, compare);
  compare.Write("compare.gif");
}
I am not sure if Metric.Undefined works, you might have to experiment a bit with the different Metric values.
Dec 18, 2013 at 7:53 AM
Thank you! I had issues with jpg files but png works great. I shall experiment with different Metric values as you have suggested. Thanks again :)