简体   繁体   English

使用ASP.net捕获窗口屏幕几分钟

[英]Capture the Window Screen for few minutes using ASP.net

"Through out the question I just talk only on the client side using asp.net" “通过这个问题,我只使用asp.net在客户端上讲话”

My requirement is to "Capture the window screen for few minutes and store it as video of any format." 我的要求是“捕获窗口屏幕几分钟,并将其存储为任何格式的视频”。

For example if I want to capture the screen of the window and store in some jpeg or gif format, I can use the system.windows.forms library and can achieve as below code 例如,如果我想捕获窗口的屏幕并以某种jpeg或gif格式存储,则可以使用system.windows.forms库,并可以实现以下代码

public void StartCapturing(object sender, EventArgs e)
{

        System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
        System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap as System.Drawing.Image);
        graphics.CopyFromScreen(25, 25, 25, 25, bitmap.Size);
        bitmap.Save(@"D:\Raghu\MyScreenshots\myscreenshot3.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
}

So my question is that is there any library that I can include so that it can satisfy my need by adding some code as simple as possible. 所以我的问题是,我可以包含任何库,以便通过添加尽可能简单的代码来满足我的需要。 I have seen some tools like snagit etc., but I could n't get clarity regarding that. 我已经看到了诸如snagit等之类的工具,但是对此我不太清楚。 Any clarifications are appreciated... 任何澄清表示赞赏...

您可能想要尝试查看Selenium来捕获网站快照,请参阅使用Selenium WebDriver截屏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM