屏幕截图保存错误 [英] screenshot saving error

查看:101
本文介绍了屏幕截图保存错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够将图像保存在本地系统中的文件夹中.
但是当我参加保存在另一个系统(服务器)中时,我得到了错误
格式不支持.请帮助
我已经给出了IP地址,驱动器名称和文件夹名称,但显示错误

i am able to save images on my local system in a folder.
But when i attend to save in another system(server) i am getting error
as format not supported.pls help
i have given ip address and drive name and folder name bu its showing error

private void timer1_Tick(object sender, EventArgs e)
        {
            this.Hide();
            System.Drawing.Bitmap Bitmap;
            Graphics Graps;
            Bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
            Graps = Graphics.FromImage(Bitmap);
            string s = comboBox1.SelectedItem.ToString()+" "+ DateTime.Now.ToString();
            s = s.Replace(':', '.');
            Graps.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);


           Bitmap.Save(@"\\192.168.1.10\E:\Screenshotseg\" + s + ".Jpeg", ImageFormat.Jpeg);

          
            this.Show();
        }

推荐答案

您无法存储在\\192.168.1.10\E:\Screenshotseg\
它应该是\\192.168.1.10\E
You cannot store at \\192.168.1.10\E:\Screenshotseg\
It should be \\192.168.1.10\E


\Screenshotseg\
\Screenshotseg\


int screenWidth = Screen.GetBounds(new Point(0,0)).Width;
int screenHeight = Screen.GetBounds(new Point(0,0)).Height;
位图bmpScreenShot =新位图(screenWidth,screenHeight);
图形gfx = Graphics.FromImage((Image)bmpScreenShot);
gfx.CopyFromScreen(0,0,0,0,new Size(screenWidth,screenHeight));
bmpScreenShot.Save(@"\\ 192.168.1.10 \ Temparea \ Screenshotseg \" + s +".Jpeg",ImageFormat.Jpeg);
int screenWidth = Screen.GetBounds(new Point(0, 0)).Width;
int screenHeight = Screen.GetBounds(new Point(0, 0)).Height;
Bitmap bmpScreenShot = new Bitmap(screenWidth, screenHeight);
Graphics gfx = Graphics.FromImage((Image)bmpScreenShot);
gfx.CopyFromScreen(0, 0, 0, 0, new Size(screenWidth, screenHeight));
bmpScreenShot.Save(@"\\192.168.1.10\Temparea\Screenshotseg\" + s + ".Jpeg", ImageFormat.Jpeg);


这篇关于屏幕截图保存错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆