Determines the format for storing captured photos.
Syntax
var value = Windows.Media.Capture.CameraCaptureUIPhotoFormat.jpeg;
Attributes
- VersionAttribute(NTDDI_WIN8)
Members
The CameraCaptureUIPhotoFormat enumeration has these members.
| Member | Value | Description |
|---|---|---|
| Jpeg | jpeg | 0 |
JPEG format. |
| Png | png | 1 |
PNG format. |
| JpegXR | jpegXR | 2 |
JPEG-XR format. |
Examples
The following example sets the photo format to JPEG.
// Takes a photo with specified settings. function takePhoto() { var captureUI = new Windows.Media.Capture.CameraCaptureUI(); captureUI.photoSettings.allowCropping = true; captureUI.photoSettings.croppedAspectRatio.height = 3; captureUI.photoSettings.croppedAspectRatio.width = 4; captureUI.photoSettings.croppedSizeInPixels.height = 0; captureUI.photoSettings.croppedSizeInPixels.width = 0; captureUI.photoSettings.format = Windows.Media.Capture.CameraCaptureUIPhotoFormat.jpeg; captureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.highestAvailable; captureUI.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.photo).then(function (capturedItem) { if (capturedItem) { document.getElementById("message").innerHTML = "User captured a photo." } else { document.getElementById("message").innerHTML = "User didn't capture a photo." } }); }
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
|
Capabilities |
|
Build date: 12/4/2012