You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the main thread to capture images through the camera, convert them into base64 strings, send them to the rendering process through IPC, and then display them through img or canvas, it causes the memory of Electron.NET to keep increasing, and eventually it crashes. Are there any other optimization methods for displaying images captured by the main thread in HTML?
The .NET solution: The webcam is queried here with the OpenCvSharp Library. This probably requires significantly more memory and energy. My memory grows to about 1.1 GB. But also not higher after longer use. So no program crash. This solution is interesting if you need to access the n byte stream with C#.
The native HTML5 solution: Here I call up the webcam using the HTML5 standard function via JavaScript. Here I notice that significantly less memory and energy is needed. The consumption is a little over 300 MB. Disadvantage, you can hardly access the bytes via C#. It would also be possible but more complicated.
So it's not a memory leak from Electron.NET or the native Electron under the hood.
Thank you for answering my question so quickly. I have tested the demo you provided, which has resolved my doubts. I have never worked with Blazor before, and this development mode is fantastic. Thanks again and I wish you a successful work and a happy life.
When I use the main thread to capture images through the camera, convert them into base64 strings, send them to the rendering process through IPC, and then display them through img or canvas, it causes the memory of Electron.NET to keep increasing, and eventually it crashes. Are there any other optimization methods for displaying images captured by the main thread in HTML?
2、img
The text was updated successfully, but these errors were encountered: