MediaCapture.CapturePhotoToStorageFileAsync 方法

定義

將相片擷取至儲存體檔案。

public:
 virtual IAsyncAction ^ CapturePhotoToStorageFileAsync(ImageEncodingProperties ^ type, IStorageFile ^ file) = CapturePhotoToStorageFileAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction CapturePhotoToStorageFileAsync(ImageEncodingProperties const& type, IStorageFile const& file);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction CapturePhotoToStorageFileAsync(ImageEncodingProperties type, IStorageFile file);
function capturePhotoToStorageFileAsync(type, file)
Public Function CapturePhotoToStorageFileAsync (type As ImageEncodingProperties, file As IStorageFile) As IAsyncAction

參數

type
ImageEncodingProperties

輸出影像的編碼屬性。

file
IStorageFile

儲存映射的儲存檔案。

傳回

會傳回用來控制非同步作業的 IAsyncAction 物件。

屬性

Windows 需求

應用程式功能
backgroundMediaRecording microphone webcam

備註

如需將相片擷取至儲存檔案的操作指南,請參閱 使用 MediaCapture 的基本基本相片、視訊和音訊擷取

適用於