Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:14:03+00:00 2026-06-09T19:14:03+00:00

I have a project with several core image filters, each connected to a different

  • 0

I have a project with several core image filters, each connected to a different slider. Everything works but I just have not figured out the best way to pass the results from one filter to the next. They each reset each time I change any of the other sliders. The reason is because the original image, created from an imported image is drawn in by each filter as the input image. But not sure how to fix this.

I am trying to think of the best way to pass in the results of multiple filters into one output image.

here is the project: owolf.net/uploads/StackOverflow/CoreImageFilter.zip

and some of the viewControler’s code pasted below:

- (void)viewDidLoad
{
    //Create CIImage
    UIImage *aUIImage = [imageView image];
    CGImageRef aCGImage = aUIImage.CGImage;
    aCIImage = [CIImage imageWithCGImage:aCGImage];

    //Create context
    context = [CIContext contextWithOptions:nil];

    saturationFilter = [CIFilter filterWithName:@"CIColorControls" keysAndValues: @"inputImage", aCIImage, nil];
    brightnessFilter = [CIFilter filterWithName:@"CIColorControls" keysAndValues: @"inputImage", aCIImage, nil];
    contrastFilter = [CIFilter filterWithName:@"CIColorControls" keysAndValues: @"inputImage", aCIImage, nil];
        [super viewDidLoad];
}


- (IBAction)saturationSliderValueChanged:(id)sender {
    outputImage = [saturationFilter outputImage];
    CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
    newUIImage = [UIImage imageWithCGImage:cgimg];
    CGImageRelease(cgimg);
    [imageView setImage:newUIImage];   
}

- (IBAction)brightnessSliderValueChanged:(id)sender {
    [brightnessFilter setValue:[NSNumber numberWithFloat:brigtnessSlider.value] forKey: @"inputBrightness"];
    outputImage = [brightnessFilter outputImage];
    CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
    newUIImage = [UIImage imageWithCGImage:cgimg];
    CGImageRelease(cgimg);
    [imageView setImage:newUIImage];
}

- (IBAction)contrastSliderValueChanged:(id)sender { 
    [contrastFilter setValue:[NSNumber numberWithFloat:contrastSlider.value] forKey: @"inputContrast"];
    outputImage = [contrastFilter outputImage];
    CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
    newUIImage = [UIImage imageWithCGImage:cgimg];
    CGImageRelease(cgimg);
    [imageView setImage:newUIImage];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:14:04+00:00Added an answer on June 9, 2026 at 7:14 pm

    You need to choose an order in which to apply the filters, then use the output of the first filter as the input image of the second, and so on. Here’s an example from one of my projects:

    CIImage *adjustedImage = self.originalImage;
    
    [self.vibranceFilter setValue:adjustedImage forKey:@"inputImage"];
    adjustedImage = [self.vibranceFilter outputImage];
    
    [self.hueFilter setValue:adjustedImage forKey:@"inputImage"];
    adjustedImage = [self.hueFilter outputImage];
    
    [self.vignetteFilter setValue:adjustedImage forKey:@"inputImage"];
    adjustedImage = [self.vignetteFilter outputImage];
    
    CGImageRef cgImage = [self.imageContext createCGImage:adjustedImage fromRect:[adjustedImage extent]];
    
    self.imageView.image = [UIImage imageWithCGImage:cgImage];
    
    CGImageRelease(cgImage);
    

    The value adjustedImage effectively accumulates the effects of the Core Image filters. This all goes in its own method, which is called whenever any of your slider values change.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project with several CSS files, each with many different settings. Every
I have a project divided into several sub-modules (each of them are jar libraries):
Hi I have a C++ project with several executable and lots of code. Each
I have a project that has components in several different directories and would like
We have a mother-ship project with several modules: foo + foo-core + foo-resource +
I have a project with several sources directories : src/A /B /C In each,
I have maven project with several modules. Need to deploy all modules( jars and
We have a mavenized project with several containers (wso2esb, wso2dss, tomcat) and many components
We have an ADP project created several years ago using Access 2000. This project
I have an Xcode project with several static library dependancies set up in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.