Question

I am trying to use Nokia Imaging SDK to filter a live camera stream and saving the stream data to an Image file. I am using Camera Stream example from Nokia Imaging.

Filter is working properly, but when I try to use EditingSession to save image, it gives me System.Runtime.InteropServices.SEHException . The code I am using to save image is -

MediaLibrary library = new MediaLibrary(); 
IBuffer jpegOut = await effects.Session.RenderToJpegAsync();
library.SavePicture(FileNamePrefix + DateTime.Now.ToString() + ".jpg", jpegOut.AsStream());

While effects.Session is actually the EditingSession used to apply filter on camera stream. I've used the same method to capture static image data, now I can't use it for streaming data. Any other way to save the filtered image??

Was it helpful?

Solution

I've solved it by capturing MediaElement into a WritableBitmap. Saving the image requires ID_CAP_MEDIALIB capability as pointed out here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top