Screenshot of a specific area in C #?

I want to take a screenshot of 512x280 pixels in size from a specific section of the screen in C # and then save the RGB information in an array. If I wanted the start (top left) of the screenshot to start with pixels (200,200), how would I do it?

I asked about this before and got the following code:

http://pastebin.com/JmCJ4Qer

However, it looks like it still creates a bitmap starting at 0,0, but just leaves this area blank until it reaches size. It creates something like this:alt text

If the image is shifted down and to the right, however, many pixels are indicated in xOrigin and yOrigin.

+3
source share
1 answer

Graphics.CopyFromScreen. 2 X/Y - . , , (0,0) (200,200) . , .

+4

Source: https://habr.com/ru/post/1782890/


All Articles