最重要的屬性是圖像的高度和寬度,但也需要其他屬性。如何獲取圖像屬性?
我試過這段代碼:
private void getImageProperties()
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog();
Dictionary<int, KeyValuePair<string, string>> fileProps =
GetFileProps(openFileDialog.FileName);
foreach (KeyValuePair<int, KeyValuePair<string, string>> kv in fileProps)
Console.WriteLine(kv.ToString());
}
但什麼是GetFileProps
?它不存在。
圖像也可以有EXIF數據。你在找那個嗎? – StingyJack
'GetFileProps'是你錯過了代碼的一些方法,請嘗試詢問編寫此代碼的人? –