05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 24-16. Core Animation’s effects panel in Interface Builder<br />

Core Image<br />

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

If you’ve ever used Adobe Photoshop, you know how much fun image filters can be. Core Image<br />

takes the idea of image filters and runs with it, for results that are both amazing and amazingly<br />

useful.<br />

Filters can range from the very simple, like a blur, to the very complex, like the new hologram<br />

effect, shown in Figure 24-17. Filters can also include operations not typically associated<br />

with filtering, such as cropping, resizing, or warping. Best of all, if there’s no existing filter to<br />

meet your needs, you can write your own.<br />

Core Image filters are nondestructive. Your images are not actually changed on disk. Rather,<br />

they are altered before being displayed on the graphics card, so you can undo or alter filters at<br />

any time, including runtime.<br />

Core Image filters can be stacked, and the stacks are intelligently optimized to give you the<br />

same results with the least processing power possible. For example, if you have a Crop filter later<br />

in the stack, Core Image will apply it first, so you don’t waste time processing pixels you’re never<br />

going to see.<br />

Core Image is available system-wide, which means you can apply its filters to anything,<br />

including video. Whether you’re tidying up your pictures in iPhoto, applying a comic book effect<br />

in Photo Booth, pretending to be a hologram in iChat Theater, or fighting your way through<br />

glowing green gas in a video game, Core Image has you covered.<br />

NOTE Unfortunately the hologram effect did not make it into the final version of <strong>Leopard</strong>, but<br />

it lives on, thanks to the Internet. Google “<strong>Leopard</strong> Hologram” for instructions on how to<br />

restore it.<br />

Core Graphics<br />

Also known as Quartz 2D, Core Graphics provides basic drawing services throughout the system.<br />

This includes primitive drawing, with paths, shapes, colors, and the like; advanced drawing<br />

like shadows, gradients, and patterns; and transforms, bitmaps, transparency, masking, and<br />

compositing.

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

Saved successfully!

Ooh no, something went wrong!