使用ExifLib 提取圖像EXIF信息的C#代碼

wufflina 8年前發布 | 1K 次閱讀 C# c# 圖像處理

[C#]代碼

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);
}

http://www.codeproject.com/Articles/36342/ExifLib-A-Fast-Exif-Data-Extractor-for-NET-2-0

 本文由用戶 wufflina 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!