0
UWP 캔버스에 비디오를 가져 오려고합니다. 그림을 성공적으로 가져 오는 코드는 다음과 같습니다. private 비동기 void AddImageButton_Click (개체 보낸 사람, RoutedEventArgs) { Image MyImage = new Image();UWP 비디오 가져 오기
var picker = new FileOpenPicker();
picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
picker.FileTypeFilter.Add(".jpg");
picker.FileTypeFilter.Add(".png");
StorageFile file = await picker.PickSingleFileAsync();
if (file != null)
{
StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", file);
// var files = await file.GetFilesAsync();
var bitmap = new BitmapImage();
var stream = await file.OpenReadAsync();
// AddHandler(, new ExceptionRoutedEventHandler(Bitmap_ImageFailed), true);
bitmap.ImageFailed += Bitmap_ImageFailed;
await bitmap.SetSourceAsync(stream);
MyImage.Source = bitmap;
AddHandler(ManipulationStartedEvent, new ManipulationStartedEventHandler(Image_ManipulationStarted), true);
AddHandler(ManipulationDeltaEvent, new ManipulationDeltaEventHandler(Image_ManipulationDelta), true);
AddHandler(ManipulationCompletedEvent, new ManipulationCompletedEventHandler(Image_ManipulationCompleted), true);
ManipulationMode = ManipulationModes.All;
MyImage.RenderTransform = ImageTransforms;
parentCanvas.Children.Add(MyImage);
}
}
비트 맵을 MediaPlayerElement로 변환 할 때 비디오를 가져 오려고 시도했지만 막혔습니다. 어떤 제안?
감사합니다.
정말 고마워요. – kmash