xlogic
xlogic

Reputation: 1559

Apply GPUImage filter to part of video

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?

enter image description here

Upvotes: 1

Views: 1262

Answers (1)

Brad Larson
Brad Larson

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

Related Questions