Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CameraCaptureUIPhotoFormat enumeration

Applies to Windows only

Determines the format for storing captured photos.

Syntax


var value = Windows.Media.Capture.CameraCaptureUIPhotoFormat.jpeg;

Attributes

[Version(0x06020000)]

Members

The CameraCaptureUIPhotoFormat enumeration has these members.

MemberValueDescription
Jpeg | jpeg0

JPEG format.

Png | png1

PNG format.

JpegXR | jpegXR2

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

Minimum supported phone

None supported

Namespace

Windows.Media.Capture
Windows::Media::Capture [C++]

Metadata

Windows.winmd

Capabilities

webcam
microphone

 

 

Show:
© 2014 Microsoft