Taking screenshots with the command line, but of specific regions

I want to capture a screenshot of a specific region, say 10x, 10y, 200width, 200height using the command line

I am aware of the command "screencapture," so I do

screencapture -h

and I see this:

-R < x,y,w,h > capture screen rect

So I try

screencapture -R 0 0 34 20 test1.png

and does not work. It returns a file named 0 that is a capture of the entire screen. I do

screencapture Test.png -R 0 0 34 20

and returns a file named Test.png that is also a capture of the entire screen.

Honorable mention to doing "man screencapture" and see that "-r" does something totally different

Thanks


Solution 1:

If you do this:

screencapture -R0,0,34,20 test1.png

you will get test1.png which has 34 pixels width and 20 pixels height.