photoEffectMono()
Adjust an image’s colors to black and white.
Declaration
class func photoEffectMono() -> any CIFilter & CIPhotoEffectReturn Value
The modified image.
Discussion
This method applies a preconfigured set of effects that imitate black-and-white photography film with low contrast.
The photo effect mono filter uses the following property:
inputImageAn image with the type CIImage.
The following code creates a filter that produces a black-and-white image:
func photoEffectMono(inputImage: CIImage ) -> CIImage {
let photoEffect = CIFilter.photoEffectMono()
photoEffect.inputImage = inputImage
return photoEffect.outputImage!
}[Image]