C# Which is the fastest way to take a screen shot?

后端 未结 3 1539
再見小時候
再見小時候 2020-12-09 06:06

I am implementing a feature that will take screen shot repeatedly and output dirty rectangles between 2 different shots then send re-draw the screen in a window.

I c

3条回答
  •  轮回少年
    2020-12-09 06:32

    This is very similar to a question asked several years ago: Here. That question was whether directx's capturing abilities could be used to get better performance.

    The consensus was that it probably wouldn't provide any performance increase, TightVNC does it very quickly by cheating. It uses a driver that doesn't have to use the API that (presumably) .NET is using.

    At some point I recall looking at the source code for Camstudio and I believe they use directx's capturing capabilities. I don't think you can push that much past 30 fps, and most of the time not even that. I'm not sure if that is a problem with the hooks camstudio uses to figure out when something has changed or the actual capture mechanism.

提交回复
热议问题