Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:17:37+00:00 2026-06-11T13:17:37+00:00

I’m using JavaScript for Windows 8 Metro App development; however, C# is not out

  • 0

I’m using JavaScript for Windows 8 Metro App development; however, C# is not out of the question. I am trying to find a way to specify the highest resolution my webcam can support for photo capturing. So far, I’ve been using MediaCapture class so I can have a preview and still capture images. I’ve noticed the CaptureUI supports an option for MaxPhotoResolution. However, I want this to be automatic and not require user interaction. I’m running out of ideas. This is for a kiosk application so workarounds are welcome as I have full control of the device. Any ideas or suggestions?

For testing, I’m using the LifeCam Studio. The camera app picks up 1920×1080 while my application captures photos in 640×480. Also, the software that comes with the drivers works flawlessly! Is this out of my control?

Updates

I’ve been looking into settings specific camera settings; this popped up; however, so far, I haven’t had any luck with it…

Update for September 18

I’ve been digging and have come up with this. Resolution properties are returned; however, the setMediaStreamPropertiesAsync method has no effect! I’m running out of ideas.

Update for December 13

I decided to give this one last try and using some of the method described on the 18th, it worked via JavaScript, with the Lifecam Studio, on the official Windows 8 release. As for why, I don’t know. Here’s the code I used:

//media=MediaCapture object
function setBestResolution(media) {
    //Gets collection of objects each describing the resolution, etc.
    var resolutions = media.videoDeviceController.getAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType.photo);
    var numResolutions=resolutions.length;

    for (var r = 0; r<resolutions;r++){
        var res = resolutions[r];
        //.width and .height are props. Debug to see all.
    }

    //I chose 40 as best option; however, programmatically you can choose any. I have dedicated kiosk app and same webcam and therefore don't need to.
    media.videoDeviceController.setMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType.photo, resolutions[40]);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:17:39+00:00Added an answer on June 11, 2026 at 1:17 pm

    I’m a little unclear on what you’re trying to do. Is the issue that you want to capture a specific photo resolution or is it that you want to capture at a particular aspect ratio?

    When using the CameraCaptureUI you can use the PhotoSettings property to set the criteria of the captured photo:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.media.capture.cameracaptureui.photosettings.aspx

    For example, you can set the CroppedAspectRatio to make sure the image is always 4:3 or 16:9. You can also set the MaxResolution property to limit the pixel dimensions of the photo when it is captured.

    The MediaCapture class is only needed when you want to have a custom capture experience as part of your application instead of using the system dialog. The default initialization for MediCapture initializes the device at its highest resolution (I believe, though I haven’t tested). It is possible to override what resolution you want MediaCapture to capture at, but you are limited to the resolutions supported by the device. You can enumerate the resolutions supported by the device and the forum post you linked to shows how:

    http://social.msdn.microsoft.com/Forums/en-SG/winappswithcsharp/thread/751b8d83-e646-4ce9-b019-f3c8599e18e0

    Of course, the resolutions supported by your device may not be the resolutions or aspect ratio you really want to keep. Therefore you may end up having to present the user with the ability to crop the photo and you may end up having to resize the image further. This will require extra code and extra UI pieces that you would need to build. If you have code to allow the user to crop and if you have code to resize (or downsample) the image to the exact resolution you want, then there isn’t really any need to change the resolution that the MediaCapture device initializes at.

    One strategy would be to create a temporary file in ApplicationData.Current.TemporaryFolder and call MediaCapture.CapturePhotoToStreamAsync on that temporary file. Then display that file in your own UI to allow cropping and finally resize it to the resolution you want before saving the final image out to real target folder.

    Though you’ll have to create your own UI for allowing the user to select the area of the image they want to keep, the WriteableBitmapEx project on CodePlex will probably prove to be exceptionally helpful in doing the actual cropping and resizing:

    http://writeablebitmapex.codeplex.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am using Paperclip to handle profile photo uploads in my app. They upload
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.