0

I'm trying to making a photo filter app for the first time. Most of photo filter apps has a slider to control intensity of filters they provide. I know how to change intensity with inputIntensity parameter...like this..

filter.setValue(intensity, forKey:"inputIntensity")

For example, CIColorMonocrome take inputIntensity parameter but most of color adjustment filters on Core Image Filter Reference page doesn't have inputIntensity parameter.. In that case, how to control intensity of filter effect I want to create??

Especially if I combine multiple effects and let users control intensity of the filter combined multiple color correction...?

Any pointer will be welcomed...!

JessJ
  • 47
  • 9
  • “ most of color adjustment filters” Like what? – matt Nov 26 '19 at 00:32
  • Well take color clamp then. The range is adjustable. But either you are outside the range or not. What would an intensity even mean here? – matt Nov 26 '19 at 01:32

1 Answers1

2

What you see as "intensity" in many apps is a simple alpha blending: You apply the filter, set the alpha (opacity) of the resulting image to your desired intensity value, and blend that image over the original. So the original "shines through" based on the intensity.

See this answer on how you can do that with Core Image.

Frank Schlegel
  • 6,476
  • 23
  • 43