Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import UIKit
import CoreImage
class CustomFilter : CIFilter {
var privateInputImage: CIImage?
var inputImage: CIImage? {
set {
privateInputImage = newValue
get {
return privateInputImage
func outputImage() -> CIImage {
let colorControls = CIFilter(name: "CIColorControls")
colorControls.setValue(0.0, forKey: "inputSaturation")
colorControls.setValue(privateInputImage, forKey: "inputImage")
return colorControls.outputImage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.