Chaining Filters

Chaining filters is the process of applying more than one filter to a source image. With the combination of filters applied to a source image, interesting effects can be produced, as shown in Figure 19.6.

Image

Figure 19.6 Sample app: filter list.

When a user taps Add Filter (refer to Figure 19.5), the addFilter: method of the ICFFilterProcessing protocol gets called in ICFViewController. The method checks to see whether the filter to be added is the first filter, in which case it leaves the source image as the inputImage for the filter. If it is not the first filter, the method uses the outputImage of the last filter as the inputImage ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.