我想在使用 PhotoCaptureDevice 选项拍照时根据 Windows Phone 8 中的设备方向旋转图像。
当设备方向为
LandscapeLeft - Image to be rotated to -90
LandscapeRight - Image to be rotated to 90
但在 Windows Phone 8 中没有找到设备方向的选项。你能请任何人帮助我吗?
最佳答案
您可以使用加速度传感器读数,然后按如下方式获取 atan2:
angle = Math.Atan2(-x,y) * 180.0 / Math.PI;
其中“角度”是相对于默认纵向方向的设备方向。
关于c# - Windows Phone 8 中的设备方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13740443/