IC 5.1.41 - how to do a screen shot, only "drawing area"

M

Marcel Preda

Guest
Hi,
How can I do in IC5.1.41 a screen shot of "drawing area".
I mean menus or borders of active window have to be removed from the
screenshot.
Something like
hiWindowSaveImage(
?target getCurrentWindow()
?path "/home/my_user/wnd.jpg"
?toplevel nil
?format "jpeg"
?quality 90
)

Which is available in 6.1.*

Until now I was able to do a screenshot using an external command
"import" from imagemagick .
But using this one is taking the entire window(with borders and menus)

Is there anyway to identify at least the size of the "drawing area" ?
I mean X and Y in pixels.

I need such a a screenshots because with some external script (based
on "convert" imagemagick) I have to put some "markers" and add some
notes on the resulted screenshots.
And I want to place the "markers" as good as possible.


Thank you,
Marcel
 
Marcel Preda wrote, on 03/23/10 07:52:
Hi,
How can I do in IC5.1.41 a screen shot of "drawing area".
I mean menus or borders of active window have to be removed from the
screenshot.
Something like
hiWindowSaveImage(
?target getCurrentWindow()
?path "/home/my_user/wnd.jpg"
?toplevel nil
?format "jpeg"
?quality 90
)

Which is available in 6.1.*

Until now I was able to do a screenshot using an external command
"import" from imagemagick .
But using this one is taking the entire window(with borders and menus)

Is there anyway to identify at least the size of the "drawing area" ?
I mean X and Y in pixels.

I need such a a screenshots because with some external script (based
on "convert" imagemagick) I have to put some "markers" and add some
notes on the resulted screenshots.
And I want to place the "markers" as good as possible.


Thank you,
Marcel
Hi Marcel,

You can do this with "ksnapshot", at least in newer versions of KDE. It has a
"Capture Mode" called "Section of Window" which will do exactly this - you can
capture just the main canvas. In older versions you can capture "Window Under
Cursor" and turn off "Include window decorations", but you still get the Cadence
menu bars and icons etc. Or you could use the "Region" mode and draw a rectangle
to capture.

Andrew.
 
On Mar 25, 6:16 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
Marcel Preda wrote, on 03/23/10 07:52:



Hi,
How can I do in IC5.1.41 a screen shot of "drawing area".
I mean menus or borders of active window have to be removed from the
screenshot.
Something like
hiWindowSaveImage(
                         ?target getCurrentWindow()
                         ?path "/home/my_user/wnd.jpg"
                         ?toplevel nil
                         ?format "jpeg"
                         ?quality 90
                     )

Which is available in 6.1.*

Until now I was able to do a screenshot using an external command
"import" from imagemagick .
But using this one is taking the entire window(with borders and menus)

Is there anyway to identify at least the size of the "drawing area" ?
I mean X and Y in pixels.

I need such a a screenshots because with some external script (based
on "convert" imagemagick) I have to put some "markers" and add some
notes on the resulted screenshots.
And I want to place the "markers" as good as possible.

Thank you,
Marcel

Hi Marcel,

You can do this with "ksnapshot", at least in newer versions of KDE. It has a
"Capture Mode" called "Section of Window" which will do exactly this - you can
capture just the main canvas. In older versions you can capture "Window Under
Cursor" and turn off "Include window decorations", but you still get the Cadence
menu bars and icons etc. Or you could use the "Region" mode and draw a rectangle
to capture.

Andrew.

Hi Andrew,

Thank you for the answer.
Unfortunately it does not help too much.
I was able to do a window capture without decoration using "import"
command - but I still have decorations.
And I do not want to ask the user to select the area.

For now the solution is to assume that in the lower-left corner of the
window I have a fixed number of pixels from the edges to the "drawing
area".


BR,
Marcel
 
Marcel Preda wrote, on 03/26/10 21:22:
On Mar 25, 6:16 pm, Andrew Beckett<andr...@DcEaLdEeTnEcTe.HcIoSm
wrote:

Hi Marcel,

You can do this with "ksnapshot", at least in newer versions of KDE. It has a
"Capture Mode" called "Section of Window" which will do exactly this - you can
capture just the main canvas. In older versions you can capture "Window Under
Cursor" and turn off "Include window decorations", but you still get the Cadence
menu bars and icons etc. Or you could use the "Region" mode and draw a rectangle
to capture.

Andrew.


Hi Andrew,

Thank you for the answer.
Unfortunately it does not help too much.
I was able to do a window capture without decoration using "import"
command - but I still have decorations.
And I do not want to ask the user to select the area.

For now the solution is to assume that in the lower-left corner of the
window I have a fixed number of pixels from the edges to the "drawing
area".


BR,
Marcel
Hi Marcel,

As I said, the ksnapshot in newer KDE versions gives a good way to do this (with
the Section of Window" choice, which allows you to just click on the canvas),
but apart from that I think you'd have to use the approach you're taking.

I'm not really familiar with imagemagick (I had a quick look at the
documentation, and wondered whether the -descend option might do it (don't think
it does though)).

One way (from a quick experiment) was to do:

xwininfo -tree # then click on the window

pick the output with the largest XxY... - for example:

andrewb2_41> xwininfo -tree

xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.

xwininfo: Window id: 0x24001e6 "VirtuosoŽ Schematic Reading: test rcac schematic"

Root window id: 0x1b6 (the root window) (has no name)
Parent window id: 0x100e686 (has no name)
1 child:
0x2400222 (has no name): () 900x690+0+0 +2155+395
7 children:
0x240023b (has no name): () 900x28+0+22 +2155+417
10 children:
0x2400245 (has no name): () 42x20+4+4 +2159+421
0x2400244 (has no name): () 50x20+46+4 +2201+421
0x2400243 (has no name): () 55x20+96+4 +2251+421
0x2400242 (has no name): () 33x20+151+4 +2306+421
0x2400241 (has no name): () 32x20+184+4 +2339+421
0x2400240 (has no name): () 46x20+216+4 +2371+421
0x240023f (has no name): () 45x20+262+4 +2417+421
0x240023e (has no name): () 56x20+307+4 +2462+421
0x240023d (has no name): () 55x20+363+4 +2518+421
0x240023c (has no name): () 36x20+860+4 +3015+421
0x2400239 (has no name): () 858x603+42+50 +2197+445
1 child:
0x240023a (has no name): () 858x603+0+0 +2197+445
0x2400238 (has no name): () 858x18+42+672 +2197+1067
0x2400237 (has no name): () 858x17+42+653 +2197+1048
0x2400226 (has no name): () 40x640+0+50 +2155+445
16 children:
0x2400236 (has no name): () 40x40+0+0 +2155+445
0x2400235 (has no name): () 40x40+0+40 +2155+485
0x2400234 (has no name): () 40x40+0+80 +2155+525
0x2400233 (has no name): () 40x40+0+120 +2155+565
0x2400232 (has no name): () 40x40+0+160 +2155+605
0x2400231 (has no name): () 40x40+0+200 +2155+645
0x2400230 (has no name): () 40x40+0+240 +2155+685
0x240022f (has no name): () 40x40+0+280 +2155+725
0x240022e (has no name): () 40x40+0+320 +2155+765
0x240022d (has no name): () 40x40+0+360 +2155+805
0x240022c (has no name): () 40x40+0+400 +2155+845
0x240022b (has no name): () 40x40+0+440 +2155+885
0x240022a (has no name): () 40x40+0+480 +2155+925
0x2400229 (has no name): () 40x40+0+520 +2155+965
0x2400228 (has no name): () 40x40+0+560 +2155+1005
0x2400227 (has no name): () 40x40+0+600 +2155+1045
0x2400225 (has no name): () 2x640+40+50 +2195+445
0x2400223 (has no name): () 900x22+0+0 +2155+395
1 child:
0x2400224 (has no name): () 878x22+0+0 +2155+395

i.e.

0x2400239 (has no name): () 858x603+42+50 +2197+445

And then I did:

import -window 0x2400239 picture.png

That worked pretty well.

Regards,

Andrew.
 
On Mar 29, 1:56 pm, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
Marcel Preda wrote, on 03/26/10 21:22:



On Mar 25, 6:16 pm, Andrew Beckett<andr...@DcEaLdEeTnEcTe.HcIoSm
wrote:

Hi Marcel,

You can do this with "ksnapshot", at least in newer versions of KDE. It has a
"Capture Mode" called "Section of Window" which will do exactly this - you can
capture just the main canvas. In older versions you can capture "Window Under
Cursor" and turn off "Include window decorations", but you still get the Cadence
menu bars and icons etc. Or you could use the "Region" mode and draw a rectangle
to capture.

Andrew.

Hi Andrew,

Thank you for the answer.
Unfortunately it does not help too much.
I was able to do a window capture without decoration using "import"
command - but I still have decorations.
And I do not want to ask the user to select the area.

For now the solution is to assume that in the lower-left corner of the
window  I have a fixed number of pixels from the edges to the "drawing
area".

BR,
Marcel

Hi Marcel,

As I said, the ksnapshot in newer KDE versions gives a good way to do this (with
the Section of Window" choice, which allows you to just click on the canvas),
but apart from that I think you'd have to use the approach you're taking.

I'm not really familiar with imagemagick (I had a quick look at the
documentation, and wondered whether the -descend option might do it (don't think
it does though)).

One way (from a quick experiment) was to do:

xwininfo -tree   # then click on the window

pick the output with the largest XxY... - for example:

andrewb2_41> xwininfo -tree

xwininfo: Please select the window about which you
           would like information by clicking the
           mouse in that window.

xwininfo: Window id: 0x24001e6 "Virtuoso Schematic Reading: test rcac schematic"

   Root window id: 0x1b6 (the root window) (has no name)
   Parent window id: 0x100e686 (has no name)
      1 child:
      0x2400222 (has no name): ()  900x690+0+0  +2155+395
         7 children:
         0x240023b (has no name): ()  900x28+0+22  +2155+417
            10 children:
            0x2400245 (has no name): ()  42x20+4+4  +2159+421
            0x2400244 (has no name): ()  50x20+46+4  +2201+421
            0x2400243 (has no name): ()  55x20+96+4  +2251+421
            0x2400242 (has no name): ()  33x20+151+4  +2306+421
            0x2400241 (has no name): ()  32x20+184+4  +2339+421
            0x2400240 (has no name): ()  46x20+216+4  +2371+421
            0x240023f (has no name): ()  45x20+262+4  +2417+421
            0x240023e (has no name): ()  56x20+307+4  +2462+421
            0x240023d (has no name): ()  55x20+363+4  +2518+421
            0x240023c (has no name): ()  36x20+860+4  +3015+421
         0x2400239 (has no name): ()  858x603+42+50  +2197+445
            1 child:
            0x240023a (has no name): ()  858x603+0+0  +2197+445
         0x2400238 (has no name): ()  858x18+42+672  +2197+1067
         0x2400237 (has no name): ()  858x17+42+653  +2197+1048
         0x2400226 (has no name): ()  40x640+0+50  +2155+445
            16 children:
            0x2400236 (has no name): ()  40x40+0+0  +2155+445
            0x2400235 (has no name): ()  40x40+0+40  +2155+485
            0x2400234 (has no name): ()  40x40+0+80  +2155+525
            0x2400233 (has no name): ()  40x40+0+120  +2155+565
            0x2400232 (has no name): ()  40x40+0+160  +2155+605
            0x2400231 (has no name): ()  40x40+0+200  +2155+645
            0x2400230 (has no name): ()  40x40+0+240  +2155+685
            0x240022f (has no name): ()  40x40+0+280  +2155+725
            0x240022e (has no name): ()  40x40+0+320  +2155+765
            0x240022d (has no name): ()  40x40+0+360  +2155+805
            0x240022c (has no name): ()  40x40+0+400  +2155+845
            0x240022b (has no name): ()  40x40+0+440  +2155+885
            0x240022a (has no name): ()  40x40+0+480  +2155+925
            0x2400229 (has no name): ()  40x40+0+520  +2155+965
            0x2400228 (has no name): ()  40x40+0+560  +2155+1005
            0x2400227 (has no name): ()  40x40+0+600  +2155+1045
         0x2400225 (has no name): ()  2x640+40+50  +2195+445
         0x2400223 (has no name): ()  900x22+0+0  +2155+395
            1 child:
            0x2400224 (has no name): ()  878x22+0+0  +2155+395

i.e.

         0x2400239 (has no name): ()  858x603+42+50  +2197+445

And then I did:

import -window 0x2400239 picture.png

That worked pretty well.

Regards,

Andrew.
Hi Andrew,

thanks a lot.
that was exactly what I wanted.
I've created a small script and now it works just like original
hiWindowSaveImage() :)
I didn't think to look at the children of the icfb window.

Best Regards,
Marcel
 

Welcome to EDABoard.com

Sponsor

Back
Top