--- On Sun, 2/21/10, ik <ido...@gmail.com> wrote:
> From: ik <ido...@gmail.com> > Subject: Re: XWindows - how capture window ? > To: "Valery Reznic" <valery_rez...@yahoo.com> > Cc: "linux-il." <linux-il@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. Valery > > Ido > > On Sat, Feb 20, 2010 at 22:13, > Valery Reznic <valery_rez...@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@cs.huji.ac.il > > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > > > _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il