Jump To:
Leopard Sample Code
Graphics and imaging on Mac OS X consists of three main developer technologies: Quartz, an advanced drawing engine and windowing environment; OpenGL, an Apple implementation of this 3D graphics industry-standard API; and QuickTime, the cross-platform multimedia technology for handling video, sound, and text.

A guided introduction for developers new to Mac OS X graphics and imaging.   Essential information for developers working with graphics and imaging.   C and Objective-C API references organized by framework.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
CarbonQuartzDrawingWPrinting (HTML) (DMG) (ZIP)
Deprecated - Demonstrates mixing QuickDraw and Quartz 2D drawing both on screen and during printing.
Quartz 2003-01-14
CarbonSketch (HTML) (DMG) (ZIP)
Core Graphics only example of a Sketch application implemented with HIToolbox. Shows 1x1-CGBitmapContext for hit-testing, printing.
Quartz 2005-03-23
CGDrawPicture (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the QDPictDrawToCGContext API.
Quartz 2003-01-14
CGGamma (HTML) (DMG) (ZIP)
Shows how to use CGDirectDisplay calls to manipulate display gamma tables.
Quartz 2003-01-14
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Quartz 2005-08-01
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Quartz 2008-04-24
CITransitionSelectorSample2 (HTML) (DMG) (ZIP)
Showing all available Core Image transitions in a scrollable NSOpenGLView
Quartz 2006-09-18
Cocoa CG aliasing demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased text and graphics using Quartz and Cocoa.
Quartz 2003-07-17
Cocoa CG arc demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased arcs using Quartz and Cocoa.
Quartz 2003-07-17
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Quartz 2007-11-02
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Quartz 2003-01-14
CoreImageGLTextureFBO (HTML) (DMG) (ZIP)
Making OpenGL textures with Core Image
Quartz 2008-07-30
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Quartz 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Quartz 2003-01-14
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Quartz 2007-12-19
IKSlideshowDemo (HTML) (DMG) (ZIP)
This small sample project shows how to use the ImageKit Slideshow to display images or PDFs.
Quartz 2006-08-01
Image Difference (HTML) (DMG) (ZIP)
Demonstrates a way to use Quartz's compositing capability to find the difference between two images.
Quartz 2003-01-30
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
Quartz 2008-07-25
ImageApp (HTML) (DMG) (ZIP)
Demonstrates basic image handling using the ImageIO APIs in Mac OS X 10.4 Tiger
Quartz 2008-01-24
JustDraw (HTML) (DMG) (ZIP)
Sample code being used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Quartz 2005-06-01
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Quartz 2007-09-27
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Quartz 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Quartz 2003-01-14
MouseTracking (HTML) (DMG) (ZIP)
Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Quartz 2005-06-01
PinBallHighScores (HTML) (DMG) (ZIP)
Demonstrates use of Quartz Composer for displaying data within an application
Quartz 2007-06-11
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Quartz 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Quartz 2006-08-07
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
Quartz 2005-07-19
QTPixelBufferVCToCGImage (HTML) (DMG) (ZIP)
Demonstrates using QTPixelBufferContextCreate with NewMovieFromProperties to output pixel buffers from a movie and draw them.
Quartz 2006-07-07
QTtoCG (HTML) (DMG) (ZIP)
Shows how to create a CGImageRef with the proper ColorSync profile from a QuickTime image on disk.
Quartz 2003-01-14
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Quartz 2007-08-31
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Quartz 2007-06-21
Quartz Composer Live DV (HTML) (DMG) (ZIP)
Shows how to export a Quartz Composer composition as a real-time DV stream on the FireWire port.
Quartz 2005-06-01
Quartz Composer Matrix (HTML) (DMG) (ZIP)
Shows how to use Quartz Composer to display a QuickTime movie as a series of frames in a 3D world.
Quartz 2005-06-01
Quartz Composer Offline Rendering (HTML) (DMG) (ZIP)
Shows how to render a Quartz Composer composition as a series of images using an OpenGL pBuffer.
Quartz 2005-06-01
Quartz Composer QCTV (HTML) (DMG) (ZIP)
Shows how to build a fake TV system using Quartz Composer as the foundation motion graphics.
Quartz 2005-07-06
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Quartz 2005-06-01
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Quartz 2005-06-01
Quartz Composer WWDC 2005 TextEdit (HTML) (DMG) (ZIP)
Demonstrate how to modify TextEdit's about dialog to display a Quartz Composer composition.
Quartz 2005-06-01
Quartz EB (HTML) (DMG) (ZIP)
WWDC 2001 Early Bird Quartz 2D tutorial of vector drawing and PDF import/export.
Quartz 2003-01-14
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Quartz 2006-09-11
QuartzCache (HTML) (DMG) (ZIP)
Demonstrates several caching techniques using CGBitmapContext, CGImageRef re-use, CGLayerRefs, CGImageSource.
Quartz 2005-06-01
QuartzComposerSamplePatches (HTML) (DMG) (ZIP)
A short list of new patches in Quartz Composer Mac OS X 10.5
Quartz 2007-06-11
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Quartz 2005-06-01
QuartzShapes (HTML) (DMG) (ZIP)
Example Quartz functions that implement equivalents to the QuickDraw PaintArc, FrameArc, PaintOval, FrameOval, PaintRect, and FrameRect
Quartz 2005-03-08
RGB ValueTransformers (HTML) (DMG) (ZIP)
Supersedes the "RGB Image sample". Sample now uses bindings. Color separation now done in an NSValueTransformer subclass.
Quartz 2003-11-18
Son of Grab (HTML) (DMG) (ZIP)
Shows how to use the new CGWindow to get window images from the Window Server.
Quartz 2007-11-01
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Quartz 2007-05-14
CIVideoDemoGL (HTML) (DMG) (ZIP)
CIVideoDemoGL demonstrates using Core Image with QuickTime and Core Video
QuickTime 2007-10-03
Core Animation QuickTime Layer (HTML) (DMG) (ZIP)
Shows the use of controls in a Layer over a Core Animation QTMovieLayer
QuickTime 2007-09-26
LiveVideoMixer (HTML) (DMG) (ZIP)
LiveVideoMixer demonstrates customized video rendering with QuickTime 7 and CoreVideo and OpenGL.
QuickTime 2008-04-24
LiveVideoMixer2 (HTML) (DMG) (ZIP)
An updated LiveVideoMixer with DV out over FireWire
QuickTime 2006-05-05
LiveVideoMixer3 (HTML) (DMG) (ZIP)
LiveVideoMixer3 is extended to support Video In via QTKit
QuickTime 2006-08-01
MyMovieFilter (HTML) (DMG) (ZIP)
How to play a movie into a layer-backed QTMovieView and apply a Core Image filter while the movie plays.
QuickTime 2008-06-02
OpenGLCompositorLab (HTML) (DMG) (ZIP)
Demonstrates using OpenGL to composite multiple sources in hardware. Requires NVIDIA GeForce 4 Ti hardware.
QuickTime 2003-04-21
QTCarbonCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render QuickTime Movies using Core Image filters and the new video pipeline.
QuickTime 2006-02-14
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
QuickTime 2005-07-19
QTCoreVideo101 (HTML) (DMG) (ZIP)
Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.
QuickTime 2008-04-24
QTCoreVideo102 (HTML) (DMG) (ZIP)
An application demonstrating the use of QTKit, CoreVdeo, and OpenGL.
QuickTime 2008-06-06
QTCoreVideo103 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.
QuickTime 2008-06-06
QTCoreVideo201 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.
QuickTime 2008-06-06
QTCoreVideo202 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL PBO and the Core Video pixel buffer pipeline.
QuickTime 2009-04-07
QTCoreVideo301 (HTML) (DMG) (ZIP)
Demonstrates adding of effects & filters to QuickTime Movies in realtime using GLSL shaders and the Core Video texture pipeline.
QuickTime 2009-04-07
QTQuartzPlayer (HTML) (DMG) (ZIP)
QTQuartzPlayer demonstrates how to render QuickTime Movies and live video with OpenGL and CoreVideo.
QuickTime 2005-10-04
qtshell (HTML) (DMG) (ZIP)
Simple QuickTime and QuickTime VR viewer framework.
QuickTime 2003-10-27
QTtoCG (HTML) (DMG) (ZIP)
Shows how to create a CGImageRef with the proper ColorSync profile from a QuickTime image on disk.
QuickTime 2003-01-14
Quartz Composer Live DV (HTML) (DMG) (ZIP)
Shows how to export a Quartz Composer composition as a real-time DV stream on the FireWire port.
QuickTime 2005-06-01
Quartz Composer Matrix (HTML) (DMG) (ZIP)
Shows how to use Quartz Composer to display a QuickTime movie as a series of frames in a 3D world.
QuickTime 2005-06-01
Quartz Composer QCTV (HTML) (DMG) (ZIP)
Shows how to build a fake TV system using Quartz Composer as the foundation motion graphics.
QuickTime 2005-07-06
StillMotion (HTML) (DMG) (ZIP)
Demonstrates how to use the QTKit Capture APIs to build a simple application that creates stop motion animations.
QuickTime 2007-11-14
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
QuickTime 2008-05-09
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Tools 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Tools 2006-08-07
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Tools 2005-06-01
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Typography 2003-01-14
StyleFlatteningSample (HTML) (DMG) (ZIP)
Shows how to use the ATSUFlatten and ATSUUnflatten APIs.
Typography 2003-01-14
TextNameTool (HTML) (DMG) (ZIP)
A command line tool sample illustrating how to use various graphical facilities and services without a login.
Typography 2003-10-27
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Video 2006-10-02
CIVideoDemoGL (HTML) (DMG) (ZIP)
CIVideoDemoGL demonstrates using Core Image with QuickTime and Core Video
Video 2007-10-03
CocoaDVDPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use DVD Playback Services to play DVD-Video media.
Video 2005-11-04
LiveVideoMixer (HTML) (DMG) (ZIP)
LiveVideoMixer demonstrates customized video rendering with QuickTime 7 and CoreVideo and OpenGL.
Video 2008-04-24
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
Video 2005-07-19
QTCoreVideo101 (HTML) (DMG) (ZIP)
Demonstrates (with very little code) how to render a QuickTime Movie using CoreVideo and OpenGL.
Video 2008-04-24
QTCoreVideo102 (HTML) (DMG) (ZIP)
An application demonstrating the use of QTKit, CoreVdeo, and OpenGL.
Video 2008-06-06
QTCoreVideo103 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.
Video 2008-06-06
QTCoreVideo201 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL FBO and the Core Video texture pipeline.
Video 2008-06-06
QTCoreVideo202 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using OpenGL PBO and the Core Video pixel buffer pipeline.
Video 2009-04-07
QTCoreVideo301 (HTML) (DMG) (ZIP)
Demonstrates adding of effects & filters to QuickTime Movies in realtime using GLSL shaders and the Core Video texture pipeline.
Video 2009-04-07
QTPixelBufferVCToCGImage (HTML) (DMG) (ZIP)
Demonstrates using QTPixelBufferContextCreate with NewMovieFromProperties to output pixel buffers from a movie and draw them.
Video 2006-07-07
VideoViewer (HTML) (DMG) (ZIP)
Simple example of video rendering using QuickTime visual contexts, OpenGL, Core Video and Core Image.
Video 2005-08-01