Hi again,
2009/6/22 <[email protected]>:
>> the program "import" from C++ code
>
> Use image.read() with a filename of 'x:' or 'x:windows-id'. This imports from
> the screen. You can try it from the command line like this
>
> convert x: screen.png
>
> You can also make any MagickCore API calls from Magick++ with the MagickCore
> namespace (i.e. MagickCore::IsHighDynamicRangeImage()).
>
well, your suggestion pointed out a feature of the image.read() method
that for me is simply exciting.
I tried to analyse the following sample code
----------------------------8<------------
#include <Magick++.h>
#include <iostream>
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
Image image;
image.read( "x:" );
return 0;
}
----------------------------8<------------
running it step by step with my GDB (after
installing tons of debugging symbols),
just to understand what was going on.
Well, I was only able to conclude that the
method image.read() is called with the signature
const string &imageSpec_
After that, I wasn't able to find the definition of the
imageSpec_ datatype; ok, I didn't try very hard, only
some `grep` in both headers and implementation directories.
I'm saying all this since I found the feature (capturing screenshot
via code) a bit... ehm... undocumented, to say the least.
My goal during this analysis was to understand how to feed the
'x:windows-id' argument, I mean how to find which is the windows-id
of the window I want to capture (clicking with the mouse is
not what I would like).
Could you please save me some time and give me an explaination
on how to compute this ID?
Is there some X11 conventions that is obvious to "insiders" but unknown to me?
Thank you very much.
Best regards,
Giovanni
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users