/// <summary> /// Extract exif data from picture directories. /// </summary> /// <param name="pictureDirectory"></param> /// <param name="pictureExiftag"></param> /// <returns></returns> public string GetExifData(MetadataExtractor.Directory pictureDirectory, int pictureExiftag) { var exifData = pictureDirectory?.GetDescription(pictureExiftag); var pictureExifData = (!string.IsNullOrEmpty(exifData)) ? (pictureExifMetaData.SpaceTabulation + exifData) : pictureExifMetaData.TabEmpty; return(pictureExifData); }
/// <summary> /// Copmare if two exif tags has the same value /// </summary> /// <param name="tag"></param> /// <param name="subDir1"></param> /// <param name="subDif2"></param> /// <returns>true if not null and has the same value</returns> private static bool CompareDir(int tag, MetadataExtractor.Directory subDir1, MetadataExtractor.Directory subDif2) { var width1 = subDir1?.GetDescription(tag); var width2 = subDif2?.GetDescription(tag); if (width1 == null && width2 == null) { return(true); } return(width1 != null && width1.Equals(width2)); }