private bool ExistAnyDateTimeExifTag(ref Jpeg VtJpeg) { bool ExifDateTime = VtJpeg.ExistPropertyItem(PropertyTagId.DateTime); bool ExifDateTimeDigitized = VtJpeg.ExistPropertyItem(PropertyTagId.DateTimeDigitized); bool ExifDateTimeOriginal = VtJpeg.ExistPropertyItem(PropertyTagId.DateTimeOriginal); return(ExifDateTime | ExifDateTimeDigitized | ExifDateTimeOriginal); }
private string GetExifString(ref Jpeg VtJpeg, string Key) { PropertyTagId PTagId = GetPIdFromStr(Key); if (VtJpeg.ExistPropertyItem(PTagId)) { return(VtJpeg.GetPropertyItemAsString(PTagId)); } else { return(""); } }
private DateTime GetPreferedDateTime(ref Jpeg VtJpeg, ArrayList PreferExifDate) { DateTime Result = DateTime.MinValue; //foreach (string Item in LBExifDates.Items) //{ // PropertyTagId PTagId = GetPIdFromStr(Item); // if (VtJpeg.ExistPropertyItem(PTagId)) // return VtJpeg.GetPropertyItemAsDateTime(PTagId); //} foreach (string Item in PreferExifDate) { PropertyTagId PTagId = GetPIdFromStr(Item); if (VtJpeg.ExistPropertyItem(PTagId)) { return(VtJpeg.GetPropertyItemAsDateTime(PTagId)); } } return(Result); }