Captured photo with stripes

后端 未结 2 1223
渐次进展
渐次进展 2020-12-03 19:43

I\'m using MediaCapture class to take a photo with Windows Phone 8.1 Runtime. The code, where I take a picture looks like this:

// create a file
StorageFile          


        
相关标签:
2条回答
  • 2020-12-03 20:11

    Ok I've figured it out myself - it's a problem with resolution which is set as default when using MediaCapture. If you set maximum resolution just after Initializing MediaCapture then there will be no stripes:

    // just after initialization
    var maxResolution = captureManager.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.Photo).Aggregate(
                        (i1, i2) => (i1 as VideoEncodingProperties).Width > (i2 as VideoEncodingProperties).Width ? i1 : i2);
    await captureManager.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.Photo, maxResolution);
    
    0 讨论(0)
  • 2020-12-03 20:26

    I tried with the lowest resolution it gets the same stripes. From MS Advance Camera sample, they use MediaCapture for preview but SilverLight API for capturing!

    The MediaCapture has also memory leak issue each time when you call CapturePhotoToXXX API.

    I wonder if they already know MediaCapture is badly managed on WindowsPhone 8.1 and this is the reason why they don't provide a Camera MediaCapture sample with RT APIs.

    0 讨论(0)
提交回复
热议问题