本文介绍了将图像DataURL另存为磁盘上的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将Image DataURL保存为磁盘上的图像?
How to save Image DataURL as an image on a disk?
推荐答案
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另存为磁盘上的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!