Compare JPEG Files in C# .NET

.NET documents comparison API to detect the changes between two versions of JPEG files and export to a final document with a detailed summary of the differences between the compared documents.


Download Free Trial

About GroupDocs.Comparison for .NET API

GroupDocs.Comparison for .NET is a native .NET API for comparing multiple images and documents of the same format. It helps you detect the differences within paragraphs, words, characters, shapes, even the text styles of the compared documents, merge the changes and export to a final document. It supports comparing and merging PDF, Word documents, Excel spreadsheets, PowerPoint presentations, Visio diagrams, Outlook emails, HTML, drawings and image file formats without using any external library.

Steps for Comparing JPEG Files in C#

GroupDocs.Comparison makes it easy for .NET developers to compare & merge multiple JPEG files in their applications by implementing a few easy steps.

  • Instantiate Comparer object with source document path or stream.
  • Call Add method and specify target document path or stream. Repeat this step for every target document.
  • Call Compare method.

System Requirements

GroupDocs.Comparison for .NET APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environments: Microsoft Visual Studio, Xamarin, MonoDevelop
  • Frameworks: .NET Framework, .NET Standard, .NET Core, Mono
  • Get the latest version of GroupDocs.Comparison for .NET downloaded from NuGet

// Compare multiple documents from local disk

using (Comparer comparer = new Comparer("source.jpeg")
{
	comparer.Add("target1.jpeg");
    comparer.Add("target2.jpeg");
    comparer.Add("target3.jpeg");
    comparer.Compare("result.jpeg"); // Create result file with the specified name
}

// Compare multiple documents from stream

using (Comparer comparer = new Comparer(File.OpenRead("source.jpeg"))
{
	comparer.Add(File.OpenRead("target1.jpeg"));
    comparer.Add(File.OpenRead("target2.jpeg"));
    comparer.Add(File.OpenRead("target3.jpeg"));
    comparer.Compare(File.Create("result.jpeg")); // Create result file with the specified name
}

Result of Comparing Files

  • Elements that were inserted in the first file. – blue, by default
  • Elements wich were deleted from the first file – red, by default

Result of Comparing Files

Live Demos of Comparing JPEG Files

Detect differences between JPEG files right now by visiting GroupDocs.Comparison Live Demos website.
The live demo has the following benefits

No need to download API

No need to write any code

Just upload the source file

Get download link to save the file

About JPEG File Format

A JPEG is a type of image format that is saved using the method of lossy compression. The output image, as result of compression, is a trade-off between storage size and image quality. Users can adjust the compression level to achieve the desired quality level while at the same time reduce the storage size. Image quality is negligibly affected if 10:1 compression is applied to the image. The higher the compression value, the higher the degradation in image quality. JPEG image file format was standardized by the Joint Photographic Experts Group and, hence, the name JPEG. The format has been the choice of storing and transmitting photographic images on the web. Almost all Operating systems now have viewers that support visualization of JPEG images, which are often stored with JPG extension as well. Even the web browsers support visualization of JPEG images.

Read More About JPEG File Format

Comparing Other File Formats

Multi format documents and images comparison API for .NET. Analyse the differences between documents of the same format without using any external tool.

Compare PDF Files

(Adobe Portable Document Format)

Compare DOC Files

(Microsoft Word Document)

Compare DOCM Files

(Microsoft Word Macro-Enabled Document)

Compare DOCX Files

(Microsoft Word Open XML Document)

Compare DOT Files

(Microsoft Word Document Template)

Compare DOTM Files

(Microsoft Word Macro-Enabled Template)

Compare DOTX Files

(Word Open XML Document Template)

Compare RTF Files

(Rich Text File Format)

Compare TXT Files

(Plain Text File Format)

Compare XLS Files

(Microsoft Excel Binary File Format)

Compare XLSX Files

(Microsoft Excel Open XML Spreadsheet)

Compare XLTM Files

(Microsoft Excel macro-enabled template)

Compare XLSM Files

(Microsoft Excel Macro-Enabled Spreadsheet)

Compare XLSB Files

(Microsoft Excel Binary Spreadsheet File)

Compare CSV Files

(Comma Separated Values File)

Compare PPT Files

(PowerPoint Presentation)

Compare PPS Files

(Microsoft PowerPoint Slide Show)

Compare PPTX Files

(PowerPoint Open XML Presentation)

Compare PPSX Files

(PowerPoint Open XML Slide Show)

Compare POT Files

(Microsoft PowerPoint template)

Compare POTX Files

(Microsoft PowerPoint Open XML Template)

Compare ODS Files

(Open Document Spreadsheet)

Compare ODP Files

(OpenDocument Presentation File Format)

Compare OTP Files

(Origin Graph Template)

Compare ODT Files

(Open Document Text)

Compare OTT Files

(Open Document Template)

Compare VST Files

(Microsoft Visio 2003-2010 XML Drawing)

Compare PNG Files

(Portable Network Graphic)

Compare GIF Files

(Graphical Interchange Format File)

Compare BMP Files

(Bitmap File Format)

Compare HTML Files

(Hyper Text Markup Language)

Compare MHTML Files

(MIME Encapsulation of Aggregate HTML)

Compare MSG Files

(Microsoft Outlook E-mail Message)

Compare EML Files

(E-mail Message)

Compare EMLX Files

(Apple Mail E-mail File)

Compare ONE Files

(Microsoft OneNote)

Compare VSD Files

(Microsoft Visio 2003-2010 Drawing)

Compare VSDX Files

(Microsoft Visio Drawing)

Compare VSS Files

(Microsoft Visio 2003-2010 Stencil)

Compare VST Files

(Microsoft Visio 2003-2010 Template)

Compare VDX Files

(Microsoft Visio 2003-2010 XML Drawing)

Compare CS Files

(CSharp Language)

Compare Java Files

(Java Language)

Compare CPP Files

(C++ Language)

Compare JS Files

(JavaScript Language)

Compare PY Files

(Python Language)

Compare RB Files

(Ruby Language)

Back to top
 English