Adding Metadata to JPEG in C#

Add custom metadata properties to a wide range of business documents, images, audio & video file formats using GroupDocs.Metadata for .NET API.


Download Free Trial

About GroupDocs.Metadata for .NET API

GroupDocs.Metadata for .NET offers an advanced set of metadata management and manipulation features, allowing .NET programmers to easily view, edit, delete, find, compare, swap and export metadata information from images and document formats without using any external software. Add metadata details to PDF, Microsoft Word, Excel, PowerPoint, Outlook, OneNote, Visio, Project, AutoCAD, Archive and Multimedia file formats with additional support to perform metadata operations on any .NET-based applications with true flexibility.

Steps for Adding JPEG Metadata in C#

GroupDocs.Metadata makes it easy for .NET developers to add metadata details to JPEG files from within their applications by implementing a few easy steps.

  • Load JPEG with an instance of Metadata class.
  • Use Metadata.AddProperties method to add the properties.
  • Use a predicate to find desired metadata properties.
  • Save the changes back in JPEG format.

System Requirements

GroupDocs.Metadata 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: Visual Studio, Xamarin, MonoDevelop
  • Frameworks: .NET Framework, .NET Standard, .NET Core, Mono
  • Download the latest version of GroupDocs.Metadata for .NET from NuGet

// load the file in an instance of Metadata class
using (var metadata = new GroupDocs.Metadata.Metadata("input.jpeg"))
{
	// add a property containing the content author
	var affected = metadata.AddProperties(p => p.Tags.Contains(
		GroupDocs.Metadata.Tagging.Tags.Person.Creator), new GroupDocs.Metadata.Common.PropertyValue("test content author")
		);
	Console.WriteLine("Affected properties: {0}", affected);
	metadata.Save("output.jpeg");
}

Live Demos to Add Metadata

Add metadata information to JPEG file right now by visiting GroupDocs.Metadata 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

Adding Metadata Properties To Other File Formats

Multi format documents and images metadata addition API for .NET. Add metadata to some of the popular file formats as stated below.

Add Metadata to PDF

(Adobe Portable Document Format)

Add Metadata to DOC

(Microsoft Word Document)

Add Metadata to DOCM

(Microsoft Word Macro-Enabled Document)

Add Metadata to DOCX

(Microsoft Word Open XML Document)

Add Metadata to DOT

(Microsoft Word Document Template)

Add Metadata to DOTX

(Word Open XML Document Template)

Add Metadata to XLS

(Microsoft Excel Binary File Format)

Add Metadata to XLSX

(Microsoft Excel Open XML Spreadsheet)

Add Metadata to XLSM

(Microsoft Excel Macro-Enabled Spreadsheet)

Add Metadata to XLTM

(OOXML Macro Enabled Workbook Template)

Add Metadata to PPT

(PowerPoint Presentation)

Add Metadata to PPS

(Microsoft PowerPoint Slide Show)

Add Metadata to PPTX

(PowerPoint Open XML Presentation)

Add Metadata to PPSX

(PowerPoint Open XML Slide Show)

Add Metadata to POTX

(Microsoft PowerPoint Open XML Template)

Add Metadata to POTM

(Microsoft PowerPoint Template)

Add Metadata to PPTM

(Microsoft PowerPoint Presentation)

Add Metadata to PPSM

(Microsoft PowerPoint Slide Show)

Add Metadata to ODS

(Open Document Spreadsheet)

Add Metadata to ODT

(Open Document Text)

Add Metadata to TIFF

(Tagged Image File Format)

Add Metadata to PNG

(Portable Network Graphic)

Add Metadata to GIF

(Graphical Interchange Format File)

Add Metadata to BMP

(Bitmap File Format)

Add Metadata to JP2

(JPEG 2000 Core Image File)

Add Metadata to WEBP

(Raster Web Image File Format)

Add Metadata to PSD

(Adobe Photoshop Document)

Add Metadata to WMF

(Windows Metafile)

Add Metadata to EMF

(Enhanced Metafile Format)

Add Metadata to MPP

(Microsoft Project Document)

Add Metadata to MSG

(Microsoft Outlook E-mail Message)

Add Metadata to EML

(E-mail Message)

Add Metadata to DWG

(Autodesk Design Data Formats)

Add Metadata to DXF

(AutoCAD Drawing Interchange)

Add Metadata to ONE

(Microsoft OneNote)

Add Metadata to MP3

(MPEG Audio Layer III)

Add Metadata to WAV

(Waveform Audio File Format)

Add Metadata to DICOM

(Digital Imaging & Comm in Medicine)

Add Metadata to AVI

(Audio Video Interleave File)

Add Metadata to VSD

(Microsoft Visio 2003-2010 Drawing)

Add Metadata to VSDX

(Microsoft Visio Drawing)

Add Metadata to VSS

(Microsoft Visio 2003-2010 Stencil)

Add Metadata to VDX

(Microsoft Visio 2003-2010 XML Drawing)

Add Metadata to VSX

(Microsoft Visio 2003-2010 XML Stencil)

Add Metadata to ZIP

(Archive File Format)

Add Metadata to EPUB

(Digital E-Book File Format)

Back to top
 English