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
[email protected] wrote:
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
On Sat, Jun 24, 2006 at 09:24:51AM +0900, Timothy H. wrote:
img = Magick::Image.capture { self.filename = “0x60000e” }
RMagick 1.15.0: class Image (class and instance methods, part 1)
Yeah, I realized that. Meant to say “entire window” in the original
email
What I’d like to do is grab only a certain size region around the mouse
cursor. (Zooming in on that area as you move the mouse around.) Maybe
the screenshot at http://rephorm.com/code/elicit will clarify a bit.
I may just need to pick up the imlib2 bindings where they were left off.