[C#]使用ExifLibrary簡易快速的擷取圖片的Exif資訊
namespace WindowsFormsApplication34 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void btnLoad_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
var photoFile = openFileDialog1.FileName;
ExifFile exifFile = ExifFile.Read(photoFile);
pbxThumbnail.Image = exifFile.Thumbnail.ToBitmap();
tbxMessage.Clear();
foreach (ExifProperty item in exifFile.Properties.Values)
{
tbxMessage.Text += string.Format("{0}:{1}
“, item.Name, item.Value); } } } } }