title: Apply a filter to only a portion of an image using a CIFilter
body: <p>I am writing a photo editing app in Objective C and I would like to include a feature where the user can apply different filters to different parts of a photo. I know how to apply filters to the entire photo but I haven't found a way to apply that filter to only one part of the photo. This question is similar to this question <a href="https://stackoverflow.com/questions/13999751/applying-cifiler-to-a-masked-portion-of-an-image">here</a> except using a mask would not work since the filter could be applied anywhere on the photo depending on the user, and I need an answer that will work with all types of filters provided by Apple <a href="https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html" rel="nofollow noreferrer">here</a>.</p>