Created
September 2, 2022 10:32
How to Compare Images in C#. For more information, please follow link: https://kb.conholdate.com/total/net/how-to-compare-images-in-csharp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using GroupDocs.Comparison; | |
namespace CompareImagesInCSharp | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) // Main function to compare Images using C# | |
{ | |
// Remove the watermark in output Image document by adding license | |
string licensePath = "/path/to/GroupDocs.Comparison.lic"; | |
GroupDocs.Comparison.License lic = new GroupDocs.Comparison.License(); | |
lic.SetLicense(licensePath); | |
using (Comparer comparer = new Comparer("/path/to/source.png")) | |
{ | |
comparer.Add("/path/to/target.png"); | |
comparer.Compare("/path/to/compare-result.png"); | |
} | |
Console.WriteLine("Done"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment