I'm converting an app to use the new Media Capture api in Windows Phone 8.1.
When I capture a photo using
mediaCaptureManager.CapturePhotoToStorageFileAsync
the file is saved and the photo orientation is landscape left as expected.
Now, when I capture a photo in portrait up orientation, there doesn't seem to be anywhere for me to set the jpg encode option for orientation, so the photo in still saved landscape left (the orientation of the sensor).
I have seen example code that re-encodes the StorageFile file after capture to rotate it, but this seems to be an expensive task.
There is an option to SetRecordRotation but that is only for video capture.
Am I missing something here?
I would have expected to be able to set orientation prior to capture, say in the image encoding properties argument of the CapturePhotoToStorageFileAsync method. But it looks like only the format type, height and width can be set?
Any guidance or example would be a great help!!
Without any more details its hard to give much help beyond saying that the MediaCapture.CapturePhotoToStorageFileAsync looks to be a very simplified way to capture photos. The documentation definitely does not have any methods for setting orientation.
I did find an article on Advanced Photo Capture for Windows Phone 8, which uses Advanced capture properties and does have methods for setting the orientation.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With