I want to rotate the Image based on the device orientation in Windows Phone 8 while taking the snap using PhotoCaptureDevice option.
When the Device orientation is
LandscapeLeft - Image to be rotated to -90
LandscapeRight - Image to be rotated to 90
But there is no option to find the device orientation in the Windows Phone 8 . Could you please anyone help me on this ?
You can use the acceleration sensor readings and then take the atan2 as follows:
where “angle” is the device orientation relativ to the default portrait orientation.