![]() |
|
[.NET] Capture desktop with the least memory consuming method. - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Capture desktop with the least memory consuming method. (/showthread.php?tid=5784526) |
Capture desktop with the least memory consuming method. - iSevere - Jan 14, 2018 This is what i use and it cant be the best way because i tested dark comet's screencapture and it uses way less memory . Spoiler (Click to View) RE: Capture desktop with the least memory consuming method. - HFDone - Jan 14, 2018 the thread running just on part of the code and you dont dispose the image RE: Capture desktop with the least memory consuming method. - Ninja - Jan 14, 2018 Like HFDone said you should dispose of the graphics and bitmap used. I tested it and for me it worked fine if put in a while loop. I used a using-statement, if you haven't used it before or don't know what it is I highly recommend you look it up. RE: Capture desktop with the least memory consuming method. - Dredd - Jan 15, 2018 If you're planning on uploading these screenshots as some form of rudimentary screen sharing system you will want to look into image compression. RE: Capture desktop with the least memory consuming method. - gigajew - Jan 15, 2018 Try something like this. Create an instance of the class while your application is alive, and make sure you dispose of it after. Subscribe to the OnScreenshotTaken event to get regular screenshots. I'm very rusty in Visual Basic .NET so there may be some mistakes. RE: Capture desktop with the least memory consuming method. - Ninja - Jan 15, 2018 The problem is that OP wants to get his process lower than 17MB, but any program in .NET is out of the box 17MB. What OP wants has nothing to do with the actual remote desktop function. RE: Capture desktop with the least memory consuming method. - Ninja - Jan 16, 2018 (Jan 16, 2018 04:47 AM)Orka Wrote: Infinite looping will of course drive memory usage up. You could suspend capturing while the system is idle and at an interval >300ms. On top of that, consider capturing only the active window. |