Most efficient way of taking a screenshot? [modified]
-
The Subject says it all... At the moment I am using the following method:
Bitmap bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
However, since I need to be taking screenshots at around every 250ms, I need to find the most efficient way possible (if any)... Thanks! Note: I have found that taking partial parts of the screen is much more efficient, but at the moment I need all the screen taken...
modified on Monday, July 20, 2009 3:22 AM
-
The Subject says it all... At the moment I am using the following method:
Bitmap bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
However, since I need to be taking screenshots at around every 250ms, I need to find the most efficient way possible (if any)... Thanks! Note: I have found that taking partial parts of the screen is much more efficient, but at the moment I need all the screen taken...
modified on Monday, July 20, 2009 3:22 AM
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
I must say that that was really helpful...