How to take screenshot of specific window in linux?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
rwikee
Posts: 7
Joined: 2010-06-09T13:27:51-07:00
Authentication code: 8675308

How to take screenshot of specific window in linux?

Post by rwikee »

Please correct my syntax

1. For taking screenshot of entire window, am using
status=MagickReadImage(magick_wand,"x:");

2. For taking snap of a particular window I used
status=MagickReadImage(magick_wand,"x:$WINDOWID");

Both are reporting syntax errors, but if I pass file names as second parameters then it is compiling without any failure. Please correct me. Thanks.........
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to take screenshot of specific window in linux?

Post by magick »

We're using ImageMagick 6.6.2-5 and this API call:
  • status=MagickReadImage(magick_wand,"x:0x2800036");
It returns the screen shot of that particular window without complaint.
rwikee
Posts: 7
Joined: 2010-06-09T13:27:51-07:00
Authentication code: 8675308

Re: How to take screenshot of specific window in linux?

Post by rwikee »

Thanks, i used x:root. then croped the desired portion.
Post Reply