Hello everyone,
In imagemagick there is a command ( import -frame -window ) where I can specify which is the active window and create a screenshot, but I am unable to find any article about that for magick++.
Can you help me ?
How to create a screenshot of the currently active window ?
-
- Posts: 2
- Joined: 2013-12-28T14:51:47-07:00
- Authentication code: 6789
Re: How to create a screenshot of the currently active windo
Use the x: coder with a X window ID. For example, xwininfo reports a windows ID of 0x240003d. Use read("x: 0x240003d") in Magick++. To test, try
- convert x:0x240003d x:
-
- Posts: 2
- Joined: 2013-12-28T14:51:47-07:00
- Authentication code: 6789
Re: How to create a screenshot of the currently active windo
Awesome, thank you so much ! Happy New Yearmagick wrote:Use the x: coder with a X window ID. For example, xwininfo reports a windows ID of 0x240003d. Use read("x: 0x240003d") in Magick++. To test, try
- convert x:0x240003d x:
Re: How to create a screenshot of the currently active windo
How can I create a screenshot of active window in windows 7 ? I can't find a "x window Id", xwininfo is just for Linux.
Re: How to create a screenshot of the currently active windo
Under Windows you need should use the following file name: 'screenshot:' (This requires the latest version of ImageMagick). And if your computer has multiple monitors you can specify an index 'screenshot:[1]'.
Re: How to create a screenshot of the currently active windo
I have tried,
...
Image screen("screenshot:"); It's work.
...
but if I save the screen
....
screen.write("screen.jpg"); I become a error
...
how can i save a screenshot?
...
Image screen("screenshot:"); It's work.
...
but if I save the screen
....
screen.write("screen.jpg"); I become a error
...
how can i save a screenshot?
-
- Posts: 1
- Joined: 2018-02-01T12:59:13-07:00
- Authentication code: 1152
Re: How to create a screenshot of the currently active window ?
Hi all
I am also trying to use `imagemagick` to capture the primary screen on my multi-monitor setup in _Windows10_
Did anybody try the
`convert 'screenshot:[1]` option that @dlemstra mentioned above?
I am also trying to use `imagemagick` to capture the primary screen on my multi-monitor setup in _Windows10_
Did anybody try the
`convert 'screenshot:[1]` option that @dlemstra mentioned above?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to create a screenshot of the currently active window ?
Yes, on Windows 8.1. It works. For my laptop, with a second screen, to capture them both:
Code: Select all
convert screenshot:[0] main.png
Code: Select all
convert screenshot:[1] second.png
snibgo's IM pages: im.snibgo.com