c# - Insufficient memory to continue the execution of the program" error when run WPF application that uses the RenderTargetBitmap class -


currently, working on project detect face live video. had used ms cognitive service face api detect face , opencvsharp streaming live video. need draw face rectangle on live video screen. had override frame draw content(whatever want). working on pc while gives error in machine although same configuration. can please suggest wrong there:

 private static bitmapsource drawoverlay(bitmapsource baseimage, action<drawingcontext, double> drawaction)     {         double annotationscale = baseimage.pixelheight / 320;          drawingvisual visual = new drawingvisual();         drawingcontext drawingcontext = visual.renderopen();          drawingcontext.drawimage(baseimage, new rect(0, 0, baseimage.width, baseimage.height));          drawaction(drawingcontext, annotationscale);          drawingcontext.close();          rendertargetbitmap outputbitmap = new rendertargetbitmap(             baseimage.pixelwidth, baseimage.pixelheight,             baseimage.dpix, baseimage.dpiy, pixelformats.pbgra32);          outputbitmap.render(visual);          return outputbitmap;     } 


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -