Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bamboo54

macrumors newbie
Original poster
hi,

I have to take a snapshot of the desktop, same way as system(screencapture...) do it, but I need to take a screenshot and put the bitmap in the buffer.
I try to use CGBitmapContextCreateImage and check the result in a BMP file ( with a test funtion I did to make a BMP file) but I got a black image...

I saw some code with OpenGL but i cant use it, anyone have an idea or something ?

I need to do this in order to make a remote control application.

thanks
 
Why reinvent the wheel? Is there something you need that VNC doesn't provide? Mightn't it be easier to add the functionality to an existing VNC server?
 
There is the CGWindow API that lets you creates images from windows (including the desktop). Spotlight "CGWindow.h"
 
Why reinvent the wheel? Is there something you need that VNC doesn't provide? Mightn't it be easier to add the functionality to an existing VNC server?

In fact, I work on a project which we have to do an optimised version of VNC home made ( Needed for helpdesk ). And I have to follow instructions....

kainjow -> thx for CGwindow, Im gonna check this.
 
In fact, I work on a project which we have to do an optimised version of VNC home made ( Needed for helpdesk ). And I have to follow instructions....

Chicken Of The VNC is open source (GPL).
http://sourceforge.net/projects/cotvnc/

Even if you don't reuse any of its source, you can read it to learn how things work.

Or as long as you don't engage in redistribution outside your organization, you can use any GPL'ed source you want, and it has no effect on any changes you make. But always have your legal department check the license.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.