BitmapImage

      在〈BitmapImage〉中尚無留言

BitmapImage

From url to file

底下的程式碼, 可以將網路上的圖片直接轉成Thumb並儲存在硬碟檔案中.

請注意, 不要使用 BitmapImage bmp=new BitmapImage(new Uri(n, UriKind.RelativeOrAbsolute))); 因這種方法還需等待下載時間完成後才能存檔. 需加入 bmp.DownloadCompleted += new EventHandler(Image_DownloadCompleted);
但因為下一張圖片立即執行, 致使上一張的DownloadCompleted通常不會發生, 非常難控制

🔒 底下內容僅限會員閱讀。

立即登入

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *