Striped Captured Photo

I use the MediaCapture class to take a picture with the Windows Phone 8.1 Runtime. The code where I take the picture is as follows:

// create a file
StorageFile photoFile = await ApplicationData.Current.LocalFolder.CreateFileAsync("myFirstPhoto.jpg", CreationCollisionOption.ReplaceExisting);

// take a photo with choosen Encoding
await captureManager.CapturePhotoToStorageFileAsync(ImageEncodingProperties.CreateJpeg(), photoFile);

The code works very well, since I get a snapshot, but with strange stripes on the left and right:

enter image description here

I am trying to find a solution to this problem, but to no avail. Did I miss something?

EDIT. Photos from the embedded application without stripes, so this is not a hardware problem.

+4
source share
2 answers

, - , MediaCapture. MediaCapture, :

// 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);
+7

, . MS Advance Camera MediaCapture , SilverLight API !

MediaCapture API CapturePhotoToXXX.

, , MediaCapture WindowsPhone 8.1, Camera MediaCapture RT API.

0

Source: https://habr.com/ru/post/1540953/


All Articles