简体   繁体   English

位图图像另存为空白图像

[英]bitmap image saving as blank image

I need to capture client screen so i reffered http://www.csharphelp.com/2006/11/capturing-the-screen-image-using-c/我需要捕获客户端屏幕,所以我推荐了http://www.csharphelp.com/2006/11/capturing-the-screen-image-using-c/

its working fine on local but on server my image is saving as blank image它在本地工作正常,但在服务器上我的图像保存为空白图像

    System.Drawing.Bitmap outputImage  = CaptureScreen.CaptureScreen.GetDesktopImage();
    string path = HttpContext.Current.Server.MapPath("~/" + "Corporate/testimages/ab1.png");

    outputImage.Save(path);

help me out thanks in advance...帮我提前谢谢...

I think the problem is, that your application is running by an user without a desktop environment.我认为问题是,您的应用程序由没有桌面环境的用户运行。 There are detected Windows Users for something like Web Applications and this user doesn't have an screen.已检测到诸如 Web 应用程序之类的 Windows 用户,但该用户没有屏幕。

You should think about extracting the Screening process in a separate program.您应该考虑在单独的程序中提取筛选过程。

EDIT: Kratika doesn't want to screen the clients screen, (s)he wants to screen an other website and provide the download link.编辑:Kratika 不想筛选客户屏幕,(s) 他想筛选其他网站并提供下载链接。

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

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