Version: 1.0 Author: Adrian Kosmaczewski Date: January 27th, 2007 Programming Languages: Objective-C Tools: Xcode Platforms: Mac OS X 10.4 “Tiger” (PowerPC & Intel) Downloads: Universal Binary and source code Licence: Creative Commons Public Domain
This application shows how to programatically grab screenshots on a Mac using several technologies:
- QuickDraw
- OpenGL
- Quartz
- Some weird window hack, that doesn’t work for me :(
- Using an NSTask wrapping the /usr/sbin/screencapture utility
The application is structured in such a way that new methods to make screenshots could be added in the future seamlessly.
As always, I’m not responsible for what you do with this code, or what happens when you use it! Do it on your own risk!
Note: the photo on my desktop background was taken by James Duncan Davidson, photographer and code guru, creator of Ant and Tomcat, among other things.
