The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[UWP][VB]Limiting Stream Size For MediaCapture RRS feed

  • Question

  • I have a MediaCapture from which I want to capture a stream, as follows:

    Await Me.cardcapture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreatePng(), stream)

    This works fine, except that the stream is larger than I want (I want to keep it below 2MB). I have looked at the following page:

    https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/set-media-encoding-properties

    But I wasn't quite sure what to do. I also tried the following page:

    https://docs.microsoft.com/en-us/uwp/api/windows.media.capture.mediacapture.preparelowlagrecordtostreamasync

    But I couldn't get it to work. All I need is to get a smaller stream, can anybody help me? Thanks.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Sunday, November 17, 2019 10:50 PM

All replies