photoEffectInstant()
Desaturates an image’s colors.
Declaration
class func photoEffectInstant() -> any CIFilter & CIPhotoEffectReturn 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:
inputImageAn 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]