pointillize()
Applies a pointillize effect to an image.
Declaration
class func pointillize() -> any CIFilter & CIPointillizeReturn Value
A CIImage containing the pointillized image.
Discussion
This filter applies a pointillize effect to an image. The effect generates an output image made of small, single-color, circular points distributed on a randomly perturbed grid.
The pointillize filter uses the following properties:
inputImageA CIImage containing the input image.
radiusThe radius in pixels of the circular points.
- center
Determines the origin of the grid.
The following code applies the pointillize filter with a radius of 40 pixels.
func pointillize(inputImage: CIImage) -> CIImage {
let pointillizeFilter = CIFilter.pointillize()
pointillizeFilter.inputImage = inputImage
pointillizeFilter.radius = 40
pointillizeFilter.center = CGPoint(x: 0,y: 0)
return pointillizeFilter.outputImage!
}[Image]