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??
I've solved it by capturing
MediaElement
into aWritableBitmap
. Saving the image requiresID_CAP_MEDIALIB
capability as pointed out here