I need to be able to identify a single window on the user's screen and take a screen capture of it. The screen data is to be stored in memory and not written to disk.
This is already supported through the commandline tool /usr/sbin/screencapture or through the Grab utility (though their functionality is not extensive enough to justify me launching them as a subprocess).
References / Hints
- nm /usr/sbin/screencapture returns private Cocoa interfaces including _CGSGetSharedWindow that appear to do this.
- Third party application Snapzpro does this (but does not provide source code)