XWindows - how capture window ?

XWindows - how capture window ?

ik idokan at gmail.com
Sun Feb 21 22:48:12 IST 2010


http://ik.homelinux.org/


On Sun, Feb 21, 2010 at 22:39, Valery Reznic <valery_reznic at yahoo.com>wrote:

>
>
> --- On Sun, 2/21/10, ik <idokan at gmail.com> wrote:
>
> > From: ik <idokan at gmail.com>
> > Subject: Re: XWindows - how capture window ?
> > To: "Valery Reznic" <valery_reznic at yahoo.com>
> > Cc: "linux-il." <linux-il at cs.huji.ac.il>
> > Date: Sunday, February 21, 2010, 10:25 PM
> > If you know the exact
> > position and dimension of the window, it's really easy
> > to capture it.
> Yes, I know it window's geometry is 640x480+0+0
>
> >
> > There are two ways to capture a window:
> > 1. access it's canvas
> > 2. capture a rectangle in the exact position of the
> > window
> >
> >
> >
> > It takes about 5 minutes to write such progem when I use
> > Lazarus, you do not even need to create a visual application
> > for it.
> There is a ready program to capture any windows - grabsc.
> The trouble is Xserver don't render window unless it appears on screen,
> and I don't want this window visible.
>

So once again I don't understand here people. Sorry for that.
Anyway, if the DC does not have a draw message it will not draw, but if the
view area is not displayed then it will not draw anyway (it save resources
like that).

Why you do not wish to make the window display only for the screen capture
and then remove it from view again ?



> Valery
> >
> > Ido
> >
> > On Sat, Feb 20, 2010 at 22:13,
> > Valery Reznic <valery_reznic at yahoo.com>
> > wrote:
> >
> >
> > Hi all.
> >
> >
> >
> > I faced following problem:
> >
> > I have X-Windows application. It has a lot of different
> > functions and buttons.
> >
> >
> >
> > When one of those buttons is pressed applications open a
> > window
> >
> > This window has a lot of different widgets inside (labels,
> > pixmaps, buttons, etc)
> >
> >
> >
> > I need to capture this windows and save it content to the
> > file.
> >
> > It's not that hard - xgrabsc program do all the work.
> >
> >
> >
> > But what is hard (at least hard for me :) is to capture
> > content of this window, without it appearing on the screen.
> >
> >
> >
> > I have source of this application, and can change it as I
> > like.
> >
> > The trouble is unless windows actually appears on the
> > screen, xserver don't bother to draw it.
> >
> >
> >
> > My screen is 640x480 I tried to create window with offset
> > 641 and 481 - i.e off screen. It doesn't work. I.e
> > window created and grabbed by xgrabsc, but it's content
> > is garbage.
> >
> > When offse is 400and 400 then part of the window appears on
> > the screen and part not.
> >
> > After grabbing this window I saw, that part that appears on
> > screen looks OK, but other part is garbage.
> >
> >
> >
> > I also tried to use XComoposite extension - without any
> > success.
> >
> >
> >
> > Application is very, very ancient. It was written withusing
> > Xlib functions and Xt toolkit - hardly more.
> >
> >
> >
> > Also application uses XSHM extension, i.e solution
> > don't have be "network-aware" - anyway this
> > application doomed to work only locally by this extension.
> >
> >
> >
> > I by no mean X expert, may be I missed something obvious
> > with XComposite
> >
> > or just missed something
> >
> >
> >
> > Do you have any ideas, how can I render this window off
> > screen and capture it's content ?
> >
> >
> >
> > Valery.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> > Linux-il mailing list
> >
> > Linux-il at cs.huji.ac.il
> >
> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> >
> >
> >
> >
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100221/61f5e606/attachment-0001.html>


More information about the Linux-il mailing list