Can I upload print screen to FTP without saving it on my drive?
At the current state I save the print screen to drive "E:\" and then upload to FTP.
Saving the image:
Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height);
Graphics graphics = Graphics.FromImage(bitmap as Image);
graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
bitmap.Save(@"E:\pic.jpg", ImageFormat.Jpeg);
Upload to FTP:
using (var client = new WebClient())
{
client.Credentials = new NetworkCredential("username", "password");
client.UploadFile("ftp://127.0.0.1/xy.jpg", WebRequestMethods.Ftp.UploadFile, @"E:\pic.jpg");
}