Created
June 21, 2020 15:43
-
-
Save prafullakumar/cefcb6c96e3fec691ca0d854191fb0b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func updateColor(image: CIImage) -> CIImage? { | |
guard let colorFilter = CIFilter(name: "CIFalseColor") else { return nil } | |
colorFilter.setValue(image, forKey: kCIInputImageKey) | |
colorFilter.setValue(color, forKey: "inputColor0") | |
colorFilter.setValue(backgroundColor, forKey: "inputColor1") | |
return colorFilter.outputImage | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment