Reputation: 1559
I want to add two filters to one video, so half of the screen shows one filter and the other half another filter. But they should be applied to the same video, just on different parts of the screen.
Is it possible to do with GPUImage? If not, what are the alternatives?
Upvotes: 1
Views: 1262
Reputation: 170317
While still a little experimental, the Swift version of GPUImage has a new capability for masking filter operations on images.
Most filters (but not all at present) can use the mask
property to provide an image for masking the regions of the image you want to apply a filter to. The mask image uses the alpha channel to denote the regions you want to mask off, with opaque areas being filtered and transparent ones unfiltered.
Upvotes: 2