/// <summary> /// Compares EXIF metadata of two jpeg files /// </summary> public static void CompareExifMetadata(string firstFile, string secondFile, ComparerSearchType type) { try { //ExStart:ExifComparisonAPI firstFile = Common.MapSourceFilePath(firstFile); secondFile = Common.MapSourceFilePath(secondFile); ExifProperty[] differences = ComparisonFacade.CompareExif(firstFile, secondFile, type); foreach (ExifProperty property in differences) { Console.WriteLine("{0} : {1}", property.Name, property.ToString()); } //ExEnd:ExifComparisonAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
/// <summary> /// Compares metadata of two documents and displays result /// </summary> public static void CompareDocument(string firstDocument, string secondDocument, ComparerSearchType type) { try { //ExStart:ComparisonAPI firstDocument = Common.MapSourceFilePath(firstDocument); secondDocument = Common.MapSourceFilePath(secondDocument); MetadataPropertyCollection differences = ComparisonFacade.CompareDocuments(firstDocument, secondDocument, type); foreach (MetadataProperty property in differences) { Console.WriteLine("{0} : {1}", property.Name, property.Value); } //ExEnd:ComparisonAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }
/// <summary> /// Compares EXIF metadata of two jpeg files /// </summary> public static void CompareExifMetadata(string firstFile, string secondFile, ComparerSearchType type) { try { //ExStart:ExifComparisonAPI firstFile = Common.MapSourceFilePath(firstFile); secondFile = Common.MapSourceFilePath(secondFile); TiffTag[] intersection = ComparisonFacade.CompareExifTags(firstFile, secondFile, ComparerSearchType.Intersection); foreach (TiffTag tag in intersection) { Console.WriteLine(tag.DefinedTag); Console.WriteLine(tag.TagType); Console.WriteLine(tag.GetFormattedValue()); } //ExEnd:ExifComparisonAPI } catch (Exception exp) { Console.WriteLine("Exception occurred: " + exp.Message); } }