From: Timothy Hunter Date: 2006-06-24T09:24:51+09:00 Subject: Re: X screen capture brian.mattern@gmail.com wrote: > Hi, > I started rewriting a screen capture application of mine in ruby in order > to test some ruby bindings for the Enlightenment Foundation Libraries). > In the c version, I use Imlib2 to grab screen data, but it doesn't look > like the imlib2 ruby bindings can do this yet. (The X specific calls > aren't finished). > > I next thought about using RMagick, but it seems as though it can only > capture the entire screen. Is this a limitation of RMagick or ImageMagick? > > Finally, are there any other ruby-bound libs out there that can grab > pixel data from the screen? > > Thanks, > Brian Mattern > > > You can use Magick::Image.capture to capture individual windows. Set self.filename to the window id: img = Magick::Image.capture { self.filename = "0x60000e" } http://www.simplesystems.org/RMagick/doc/image1.html#capture