How to take screenshot programmically of desktop area in Mac OS X ?
C++ – How to take screenshot in Mac OS X using Cocoa or C++
ccocoamacos
Related Topic
- Ios – How to check for an active Internet connection on iOS or macOS
- C++ – Why is “using namespace std;” considered bad practice
- Macos – Find (and kill) process locking port 3000 on Mac
- Macos – Who is listening on a given TCP port on Mac OS X
- Postgresql – How to start PostgreSQL server on Mac OS X
- Android – Set up adb on Mac OS X
- Javascript – JQuery closest() help
- Java – How to install Java 8 on Mac
Best Answer
Two interesting options I have seen, but yet to use professionally, are the screencapture utility and a MacFuse demo.
The screencapture utility has been around since 10.2, according to the man page, and could be linked to a Cocoa application by use of NSTask.
The MacFuse demo worked by creating a new screenshot each time a folder was opened, or something like that. The idea being you could write a quick script to access the image when you needed it, without having to have the script actually run on that machine.
But seriously, Apple has some other sample code called "Son of Grab" which uses the new CGWindow API which is pretty awesome.
http://developer.apple.com/samplecode/SonOfGrab/