GroupDocs.Metadata for .NET 20.4 Release Notes

Note
This page contains release notes for GroupDocs.Metadata for .NET 20.4

Major Features

There are the following features, enhancements and fixes in this release:

  • Implement the ability to work with EXIF metadata in PNG images
  • Implement the ability to work with XMP metadata in MP3 files
  • Implement the ability to parse most common EXIF Makernote metadata formats using the new API

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
METADATANET-2847Implement the ability to work with EXIF metadata in PNG imagesNew Feature
METADATANET-2852Implement the ability to work with XMP metadata in MP3 filesNew Feature
METADATANET-3185Implement the ability to parse most common EXIF Makernote metadata formats using the new APIEnhancement

Public API and Backward Incompatible Changes

Note
This section lists public API changes that were introduced in GroupDocs.Metadata for .NET 20.4. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in GroupDocs.Metadata which may affect existing code. Any behavior introduced that could be seen as a regression and modifies existing behavior is especially important and is documented here.

Implement the ability to work with EXIF metadata in PNG images

This new feature allows the user to read, update and remove EXIF metadata in PNG images.

Public API changes

The ExifPackage property has been added to the PngRootPackage class

The PngRootPackage class now implements the IExif interface

Use cases

Read EXIF metadata properties in a PNG  image

using (Metadata metadata = new Metadata(@"D:\exif.png"))
{
	IExif root = metadata.GetRootPackage() as IExif;
	if (root != null && root.ExifPackage != null)
	{
		Console.WriteLine(root.ExifPackage.Artist);
		Console.WriteLine(root.ExifPackage.Copyright);
		Console.WriteLine(root.ExifPackage.ImageDescription);
		Console.WriteLine(root.ExifPackage.Make);
		Console.WriteLine(root.ExifPackage.Model);
		Console.WriteLine(root.ExifPackage.Software);
		Console.WriteLine(root.ExifPackage.ImageWidth);
		Console.WriteLine(root.ExifPackage.ImageLength);
		// ...
		Console.WriteLine(root.ExifPackage.ExifIfdPackage.BodySerialNumber);
		Console.WriteLine(root.ExifPackage.ExifIfdPackage.CameraOwnerName);
		Console.WriteLine(root.ExifPackage.ExifIfdPackage.UserComment);
		// ...
		Console.WriteLine(root.ExifPackage.GpsPackage.Altitude);
		Console.WriteLine(root.ExifPackage.GpsPackage.LatitudeRef);
		Console.WriteLine(root.ExifPackage.GpsPackage.LongitudeRef);
		// ...
	}
}

Implement the ability to work with XMP metadata in MP3 files

This new feature allows the user to read, update and remove XMP metadata in MP3 audio files.

Public API changes

The XmpPackage property has been added to the MP3RootPackage class

The MP3RootPackage class now implements the IXmp interface

Use cases

Read XMP metadata properties in an MP3 audio

using (Metadata metadata = new Metadata(@"D:\xmp.mp3"))
{
	IXmp root = metadata.GetRootPackage() as IXmp;
	if (root != null && root.XmpPackage != null)
	{
		if (root.XmpPackage.Schemes.XmpBasic != null)
		{
			Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.CreatorTool);
			Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.CreateDate);
			Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.ModifyDate);
			Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.Label);
			Console.WriteLine(root.XmpPackage.Schemes.XmpBasic.Nickname);

			// ...
		}
		if (root.XmpPackage.Schemes.DublinCore != null)
		{
			Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Format);
			Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Coverage);
			Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Identifier);
			Console.WriteLine(root.XmpPackage.Schemes.DublinCore.Source);

			// ...
		}
		if (root.XmpPackage.Schemes.Photoshop != null)
		{
			Console.WriteLine(root.XmpPackage.Schemes.Photoshop.ColorMode);
			Console.WriteLine(root.XmpPackage.Schemes.Photoshop.IccProfile);
			Console.WriteLine(root.XmpPackage.Schemes.Photoshop.Country);
			Console.WriteLine(root.XmpPackage.Schemes.Photoshop.City);
			Console.WriteLine(root.XmpPackage.Schemes.Photoshop.DateCreated);

			// ... 
		}

		// ...
	}
}

Implement the ability to parse most common EXIF Makernote metadata formats using the new API

This enhancement allows the user to read MakerNote metadata packages stored by various camera manufacturers. Currently, this feature is available for JPEG images only.

Public API changes

The MakerNotePackage property has been added to the JpegRootPackage class

The GroupDocs.Metadata.Standards.Exif.MakerNote namespace has been introduced

The following classes have been added to the GroupDocs.Metadata.Standards.Exif.MakerNote namespace

Use cases

Read all MakerNote properties in the form of TIFF/EXIF tags

using (Metadata metadata = new Metadata(Constants.CanonJpeg))
{
	var root = metadata.GetRootPackage<JpegRootPackage>();
	if (root.MakerNotePackage != null)
	{
		foreach (var tag in root.MakerNotePackage.ToList())
		{
			// Please note that tag ids used by camera manufacturers may intersect with the ids defined in the TIFF/EXIF specification
			Console.WriteLine("{0} = {1}", (int) tag.TagID, tag.Value);
		}
	}
}

Read Canon MakerNote properties

using (Metadata metadata = new Metadata(Constants.CanonJpeg))
{
	var root = metadata.GetRootPackage<JpegRootPackage>();
	var makerNote = (CanonMakerNotePackage)root.MakerNotePackage;
	if (makerNote != null)
	{
		Console.WriteLine(makerNote.CanonFirmwareVersion);
		Console.WriteLine(makerNote.CanonImageType);
		Console.WriteLine(makerNote.OwnerName);
		Console.WriteLine(makerNote.CanonModelID);

		// ...

		if (makerNote.CameraSettings != null)
		{
			Console.WriteLine(makerNote.CameraSettings.AFPoint);
			Console.WriteLine(makerNote.CameraSettings.CameraIso);
			Console.WriteLine(makerNote.CameraSettings.Contrast);
			Console.WriteLine(makerNote.CameraSettings.DigitalZoom);

			// ...
		}
	}
}

Read Nikon MakerNote properties

using (Metadata metadata = new Metadata(Constants.NikonJpeg))
{
	var root = metadata.GetRootPackage<JpegRootPackage>();
	var makerNote = (NikonMakerNotePackage) root.MakerNotePackage;
	if (makerNote != null)
	{
		Console.WriteLine(makerNote.ColorMode);
		Console.WriteLine(makerNote.FlashSetting);
		Console.WriteLine(makerNote.FlashType);
		Console.WriteLine(makerNote.FocusMode);
		Console.WriteLine(makerNote.Quality);
		Console.WriteLine(makerNote.Sharpness);

		// ...
	}
}

Read Panasonic MakerNote properties

using (Metadata metadata = new Metadata(Constants.PanasonicJpeg))
{
	var root = metadata.GetRootPackage<JpegRootPackage>();
	var makerNote = (PanasonicMakerNotePackage) root.MakerNotePackage;

	if (makerNote != null)
	{
		Console.WriteLine(makerNote.AccessorySerialNumber);
		Console.WriteLine(makerNote.AccessoryType);
		Console.WriteLine(makerNote.MacroMode);
		Console.WriteLine(makerNote.LensSerialNumber);
		Console.WriteLine(makerNote.LensType);

		// ...
	}
}

Read Sony MakerNote properties

using (Metadata metadata = new Metadata(Constants.SonyJpeg))
{
	var root = metadata.GetRootPackage<JpegRootPackage>();
	var makerNote = (SonyMakerNotePackage)root.MakerNotePackage;
	if (makerNote != null)
	{
		Console.WriteLine(makerNote.CreativeStyle);
		Console.WriteLine(makerNote.ColorMode);
		Console.WriteLine(makerNote.JpegQuality);
		Console.WriteLine(makerNote.Brightness);
		Console.WriteLine(makerNote.Sharpness);

		// ...
	}
}