0

我需要将本地存储文件夹中的图像保存到从 SavePicker 中选择的文件中。我应该使用流吗?这是我的代码:

            StorageFile file = await savePicker.PickSaveFileAsync();
            if (null != file)
            {
                var localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                StorageFile current_photo = await localFolder.GetFileAsync(img.Tag.ToString());

                // TODO Stream from current_photo to file
            }
4

1 回答 1

1

CopyAsync应该这样做:

await current_photo.CopyAndReplaceAsync(file);
于 2013-02-24T16:07:43.333 回答