将图像DataURL另存为磁盘上的图像 [英] Save Image DataURL as an image on disk
本文介绍了将图像DataURL另存为磁盘上的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将Image DataURL保存为磁盘上的图像?
How to save Image DataURL as an image on a disk?
推荐答案
如果我理解正确 您想要从中下载图像网络到磁盘
试试这个代码
     
if i understood correctly you want to download an Image from the web to the disk
try this code
async void DownloadImage (string URL)
{
Uri u = new Uri(URL);
StorageFile destinationFile = await ApplicationData.Current.LocalFolder.CreateFileAsync("ImageTargetName", CreationCollisionOption.ReplaceExisting);
BackgroundDownloader downloader = new BackgroundDownloader();
BackgroundDownloader downloader = new BackgroundDownloader();
var download = downloader.CreateDownload(u,destinationFile);
var download = downloader.CreateDownload(u, destinationFile);
download.StartAsync() ;   
}
download.StartAsync(); }
这篇关于将图像DataURL另存为磁盘上的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文