private async void OpenFile_Click(object sender, RoutedEventArgs e) { // 画像を開くダイアログの設定 FileOpenPicker fileOpenPicker = new FileOpenPicker() { SuggestedStartLocation = PickerLocationId.PicturesLibrary }; fileOpenPicker.FileTypeFilter.Add(".jpg"); fileOpenPicker.ViewMode = PickerViewMode.Thumbnail; // ファイルを1つ選択する InputFile = await fileOpenPicker.PickSingleFileAsync(); if (InputFile == null) { // The user cancelled the picking operation return; } Bitmap = await OutputFunctions.CreateSoftwareBitMapAsyncFrom(InputFile); await SetCtrlToImgAsync(Preview); }
public async void SaveFile_Click(object sender, RoutedEventArgs e) { await OutputFunctions.SaveImgAsync(Bitmap); }