示例#1
0
        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);
        }
示例#2
0
 public async void SaveFile_Click(object sender, RoutedEventArgs e)
 {
     await OutputFunctions.SaveImgAsync(Bitmap);
 }