1
我在C#和VS2013中为Lumia 640 XL WP 8.1编写了一个简单的代码,就像一个示例照片应用程序。不错,但它有一个小问题:当图片保存到媒体中时,则此图片向左旋转90度。如何在WP8.1中旋转CaptureManager保存的照片
这里是我的设置预览区码:
captureManager = new MediaCapture();
await captureManager.InitializeAsync();
captureManager.SetPreviewRotation(VideoRotation.Clockwise90Degrees);
captureManager.SetRecordRotation(VideoRotation.Clockwise90Degrees);
cptElement.Source = captureManager;
await captureManager.StartPreviewAsync();
这里是捕获代码:
ImageEncodingProperties imgFormat = ImageEncodingProperties.CreateJpeg();
StorageFile file = await KnownFolders.PicturesLibrary.CreateFileAsync("Photo.jpg", CreationCollisionOption.GenerateUniqueName);
await captureManager.CapturePhotoToStorageFileAsync(imgFormat, file);
所以,你可以看到,我试图旋转终于在这张照片命令行:
captureManager.SetRecordRotation(VideoRotation.Clockwise90Degrees);
但它没有奏效。
在这种情况下我该做什么?
感谢您的帮助,并为我的纯英语感到抱歉。