ExifLib.NET的Exif讀取庫(kù)
ExifLib 簡(jiǎn)化了 .NET 應(yīng)用讀取圖片 EXIF 標(biāo)簽數(shù)據(jù)的過(guò)程。
示例代碼:
using ExifLib;
...
...
...
// Instantiate the reader
ExifReader reader = new ExifReader(@"C:\temp\testImage.jpg");
// Extract the tag data using the ExifTags enumeration
DateTime datePictureTaken;
if (reader.GetTagValue<DateTime>(ExifTags.DateTimeDigitized,
out datePictureTaken))
{
// Do whatever is required with the extracted information
MessageBox.Show(this, string.Format("The picture was taken on {0}",
datePictureTaken), "Image information", MessageBoxButtons.OK);
}
ExifLib 也可通過(guò) NuGet 獲取。
評(píng)論
圖片
表情
