Topic: application window screenshot

Hi!It is my first post here...hope I'll be frequent member in future..

I am not sure if it's the right category...:)

I have a ruby on rails application (not written by me).This application uses chipmunk graphics which are shown in a separate window.
What I want to do is to send screenshots of these graphics to another pc using sockets, periodically...
The socket part is within my knowledge range but I have no idea how the image extraction can be done...
The last solution for me is to use a third-party application...I prefer adding some lines of code...

Not sure if ruby can do this but I had to try..

Thanks for reading,
Vasilis smile


PS: Maybe chipmunk has a special function for this...but I guess I have to ask in chipmunk's forum..:)