I use Windows 8. I have coordinates of the part of the screen and I want to make screenshot only of that rectangle. How can I do it with ImageMagick?
Asked
Active
Viewed 3,422 times
2
-
What OS/platform are you on? – Mark Setchell Oct 12 '14 at 09:29
-
http://www.imagemagick.org/discourse-server/viewtopic.php?f=23&t=24702 – Mark Setchell Oct 12 '14 at 09:37
-
@MarkSetchell I need to make screenshot of the part of the screen, not of the active window. – vasili111 Oct 12 '14 at 09:44
1 Answers
5
If you have at least ImageMagick 6.8.9-0 you can do the following to take a screenshot of part of your screen:
convert screenshot: -crop 100x100+500+500 screenshot.png
In example above, -crop
operation cuts out a rectangle that is 100x100 (width
and height
) at position 500x500 (x
and y
of the top left corner of the rectangle). And if your computer has multiple monitors you can specify an index screenshot:[1]
. The index of the monitor starts with 0
, so first monitor will have index 0
.
convert screenshot:[1] -crop 100x100+500+500 screenshot.png