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);
但它沒有奏效。
在這種情況下我該做什麼?
感謝您的幫助,併爲我的純英語感到抱歉。