dither()
Applies randomized noise to produce a processed look.
Declaration
class func dither() -> any CIFilter & CIDitherReturn Value
The modified image.
Discussion
The effect applies a dithering effect to the input image. The effect applies randomized noise to the input image to produce a processed look.
The dither filter uses the following properties:
inputImageAn image with the type CIImage.
intensityA
floatrepresenting the desired strength of the effect as an NSNumber.
The following code creates a filter that adds desaturation to the input image:
func dither(inputImage: CIImage) -> CIImage {
let ditherFilter = CIFilter.dither()
ditherFilter.inputImage = inputImage
ditherFilter.intensity = 0.4
return ditherFilter.outputImage!
}[Image]