05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

440<br />

CHAPTER 24 MAC <strong>OS</strong> X DEVELOPMENT: THE APPLICATION FRAMEWORKS<br />

Because the underlying Quartz compositing engine is based on PDF, Core Graphics is also<br />

able to deal with PDF directly, including simple file operations like parsing and creation, as well<br />

as transforms, metadata access, and conversion from PostScript.<br />

Figure 24-17. Photo Booth uses Core Image filters, including everyone’s favorite: Hologram.<br />

Core Graphics is blazing fast thanks to hardware acceleration, offloading as much processing<br />

as possible to the video card. It provides an abstraction layer, so you can deal with graphics<br />

directly, without worrying about how the actual processing will be done. Yesterday’s machines<br />

will automatically ramp to CPU processing, and tomorrow’s machines will take advantage of<br />

whatever heavy silicon they’ve got.<br />

Even if you never use Core Graphics directly, you’ll see its influence (and its prefix, CG)<br />

everywhere. For example, its width-agnostic floating-point scalar, CGFloat, replaces standard<br />

float and double types in many applications.<br />

NOTE In lieu of separate namespaces, frameworks use informal prefixes to give their members<br />

unique names. For example, consider three different classes for representing an image:<br />

CGImage, CIImage, and NSImage, from Core Graphics, Core Image, and Cocoa (formerly known<br />

as NeXTSTEP).<br />

Core Video<br />

When you think about it, video is more of a concept than a thing. When you say you have “a<br />

video,” you really mean you have a VHS tape, or a DVD, or an MP4 file, or some of that newfangled<br />

H.264 the kids are talking about. Video, while one simple term, actually encompasses a<br />

lot of complexity that the operating system protects us from.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!