2013-05-20 87 views

回答

0

這個article from MSDN有一個訪問前後攝像頭以及訪問閃存的例子,假設你使用C#(因爲你沒有指定)。這裏是下片段創建捕獲設備標題:

System.Collections.Generic.IReadOnlyList<Windows.Foundation.Size> SupportedResolutions = 
    PhotoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Front); 
Windows.Foundation.Size res = SupportedResolutions[0]; 
this.captureDevice = await PhotoCaptureDevice.OpenAsync(CameraSensorLocation.Front, res); 

方法來訪問相機的閃光燈,這裏是下指定相機屬性片段標題:

cam.SetProperty(KnownCameraPhotoProperties.FlashMode, FlashState.On); 
cam.SetProperty(KnownCameraGeneralProperties.PlayShutterSoundOnCapture, true); 
cam.SetProperty(KnownCameraGeneralProperties.AutoFocusRange, AutoFocusRange.Infinity); 

希望這幫助!

相關問題