Export (0) Print
Expand All
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.

CameraCaptureUIMaxPhotoResolution enumeration

Determines the highest resolution the user can select for capturing photos.

Syntax


var value = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.highestAvailable;

Attributes

[Version(0x06020000)]

Members

The CameraCaptureUIMaxPhotoResolution enumeration has these members.

MemberValueDescription
HighestAvailable | highestAvailable0

The user can select any resolution.

VerySmallQvga | verySmallQvga1

The user can select resolutions up to 320 X 240, or a similar 16:9 resolution.

SmallVga | smallVga2

The user can select resolutions up to 320 X 240, or a similar 16:9 resolution.

MediumXga | mediumXga3

The user can select resolutions up to 1024 X 768, or a similar 16:9 resolution.

Large3M | large3M4

The user can select resolutions up to 1920 X 1080, or a similar 4:3 resolution.

VeryLarge5M | veryLarge5M5

The user can select resolutions up to 5MP.

Examples

The following example sets the photo resolution to the highest resolution available.


// 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 (device family)

Device family

Desktop

API contract

Windows.Media.Capture.CameraCaptureUIContract, introduced version 1.0

Namespace

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

Metadata

Windows.Media.Capture.CameraCaptureUIContract.winmd

Requirements (operating system)

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

 

 

Show:
© 2015 Microsoft