title: Applying multiple CIFilters on image
body: <p>I have a problem with adding multiple CIFilters on image, f.e. when I add brightness filter and then try to add contrast image goes to original (losses brightness filter) and then adds contrast filter.</p>
  
  <pre><code>- (IBAction)brightnessSlider:(NSSlider*)sender {
      ViewController *controller = (ViewController*)[NSApplication sharedApplication].keyWindow.contentViewController;
      CIFilter *brightness = [CIFilter filterWithName:@"CIColorControls" keysAndValues: kCIInputImageKey, originalCIImage, @"inputBrightness", [NSNumber numberWithFloat:[sender floatValue]], nil];
      controller.imageView.image = [self fromCIImageToNSImage:[brightness outputImage]];
  }
  
  - (IBAction)contrastSlider:(id)sender {
      ViewController *controller = (ViewController*)[NSApplication sharedApplication].keyWindow.contentViewController;
      CIFilter *contrast = [CIFilter filterWithName:@"CIColorControls" keysAndValues: kCIInputImageKey, originalCIImage, @"inputContrast", [NSNumber numberWithFloat:[sender floatValue]], nil];
      controller.imageView.image = [self fromCIImageToNSImage:[contrast outputImage]];
  }
  </code></pre>
  
  <p>If I use <code>originalCIImage = [CIFilter outputImage];</code> (CIFilter = brightness/contrast) after adding brightness and contrast (applying filters for changed image), then the image goes completely black/grey/white.</p>
  
  <p><strong>How to prevent image from changing back to original and apply several filters simultaneously?</strong></p>
  
  <p>I have read this post answer <a href="https://stackoverflow.com/questions/51938562/how-to-change-brightness-contrast-and-saturation-using-cicolorcontrols-via-uisl">link of the post</a> but applying filters to original image just resets the image as it should..</p>