0

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??

David Božjak
  • 16,887
  • 18
  • 67
  • 98
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184

1 Answers1

0

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

Community
  • 1
  • 1
0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184