ExifLib.NET的Exif读取库
ExifLib 简化了 .NET 应用读取图片 EXIF 标签数据的过程。
示例代码:
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 也可通过 NuGet 获取。
评论