2

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?

vasili111
  • 6,032
  • 10
  • 50
  • 80

1 Answers1

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
vasili111
  • 6,032
  • 10
  • 50
  • 80
dlemstra
  • 7,813
  • 2
  • 27
  • 43