我有一个支持Flashmode的照片应用程序,所以我可以决定使用autoFlash,每张照片都不使用闪光灯或闪光灯。但是,我不想实现闪光灯照亮场景以获得关于QR码的良好视图。 因此,用户必须单击flashmode按钮切换模式:Flashmode.Auto,FlashMode.On,FlashMode.Off和新的“使用Flash LED作为手电筒”...... 这在Windows Phone 7/8中是否可行?
THX
答案 0 :(得分:0)
在Windows Phone 8中,您可以使用AudioVideoCaptureDevice和属性VideoTorchMode = On本地执行此操作。
在Windows Phone 7上,您需要使用Reflection并加载" Microsoft.Phone.Media.Extended"图书馆可以获得像AudioVideoCaptureDevice这样的内容,并在录制视频时打开闪光灯。
这对于在WP7中使用手电筒非常有用。 http://www.locked.nl/wp7-flashlight-getting-started
答案 1 :(得分:0)
:
<VideoBrush x:Name="PART_VideoBrush">
<VideoBrush.RelativeTransform>
<CompositeTransform x:Name="PART_VideoTransform" CenterX=".5"CenterY=".5" />
</VideoBrush.RelativeTransform>
</VideoBrush>
在您的代码中:
PhotoCamera _cam = new PhotoCamera();
this._cam.Initialized += _cam_Initialized;
CameraVideoBrushExtensions.SetSource(this.PART_VideoBrush, this._cam);
this.PART_VideoTransform.Rotation = 90.0;
private void _cam_Initialized(object sender, CameraOperationCompletedEventArgs e)
{
this._cam.FlashMode = FlashMode.Off; //FrashMode.ON,Auto, RedEyeReduction
}