Search code examples
c#imagescreenshottrimcrop

Choosing between two methods of screen capturing in C#


The purpose of my Program is to capture multiple areas on the screen. I'm choosing between 2 methods to write this program:

  1. Making one big screenshot 800x600 for further cropping (10+ areas)

  2. Or making multiple Small screenshots with given coordinates. (10+)

what's better in terms of performance?

another question which is also related to this question is:

where do I keep all crop coordinates? I'll need at least one Column to specify numbering, Next two columns will have X and Y coordinates and last two - W and H. I was thinking about making a dictionary for a separate crop.. or maybe a table, SQL, INI, array ?? that's the second question. Easiness of use and performance are top priorities.

thanks

Edit: Rephrasing the question. What's faster - To capture a screenshot of whole screen and Crop it into 100 small areas (W:10 & H:100) OR to capture 100 small Screenshots without the need to crop anything?


Solution

  • The answer is to measure this. We can't know the answer without trying. It also probably depends on the exact count and sized of the screenshot areas.