Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8879

[Windows] Camera picture has black/green stripes that crop image

    XMLWordPrintableJSON

Details

    Description

      When a photo is taken with Windows Phone 8.1 device Nokia Lumia 735, the picture returned shows black or green stripes on the sides and is out of shape. It seems this is related to photo resolution but I can't get it fixed in JS.

      It seems to be quite a common problem with the Media Capture API and people solved issue in C# here is an illustration : http://stackoverflow.com/questions/23709547/captured-photo-with-stripes

      Here is what I tried without success :

      var resolutions = capture.videoDeviceController.getAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType.photo);
      var maxWidth = 0;
      var maxResolution = null;
      for(var i=0; i<resolutions.length; i++){
      //console.log(resolutions[i].width);
      if(resolutions[i].width > maxResolution)

      { maxWidth = resolutions[i].width; maxResolution = resolutions[i]; }

      }
      capture.videoDeviceController.setMediaStreamPropertiesAsync(Windows.Media.Capture.MediaStreamType.photo, maxResolution)

      Am I missing something ?

      Attachments

        Activity

          People

            muratsu Murat Sutunc
            overmont Olivier VERMONT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: