Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active January 12, 2021 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/d1153909e5e54a8c00ccd5ee422a450c to your computer and use it in GitHub Desktop.
Save GroupDocsGists/d1153909e5e54a8c00ccd5ee422a450c to your computer and use it in GitHub Desktop.
Compare Images to Highlight Differences
// Compare JPG, PNG, GIF, BMP image formats using .NET Image Comparison API in C#
using (Comparer comparer = new Comparer("filepath/soureImage.jpg"))
{
CompareOptions options = new CompareOptions();
options.GenerateSummaryPage = false; // To get the difference summary, set it 'true'
comparer.Add("filepath/targetImage.jpg");
comparer.Compare("filepath/comparisonResultImage.jpg", options);
}
@GroupDocsGists
Copy link
Author

You may visit the blog post for How to Compare Images in C#.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment