Contents

photoEffectMono()

Adjust an image’s colors to black and white.

Declaration

class func photoEffectMono() -> any CIFilter & CIPhotoEffect

Return 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:

inputImage

An 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]

See Also

Color Effect Filters