Contents

photoEffectInstant()

Desaturates an image’s colors.

Declaration

class func photoEffectInstant() -> any CIFilter & CIPhotoEffect

Return Value

The modified image.

Discussion

This method applies a preconfigured set of effects that imitate vintage photography film with desaturated colors.

The photo effect instant filter uses the following property:

inputImage

An image with the type CIImage.

The following code creates a filter that results in the input image becoming desaturated:

func photoEffectInstant(inputImage: CIImage ) -> CIImage {
    let photoEffect = CIFilter.photoEffectInstant()
    photoEffect.inputImage = inputImage
    return photoEffect.outputImage!
}

[Image]

See Also

Color Effect Filters