bloom()
Adjusts an image’s colors by applying a blur effect.
Declaration
class func bloom() -> any CIFilter & CIBloomReturn Value
The modified image.
Discussion
This method applies the bloom filter to an image. The effect softens edges and adds a slight blur effect.
The bloom filter uses the following properties:
inputImageAn image with the type CIImage.
radiusA
floatrepresenting the area of effect as an NSNumber.intensityA
floatrepresenting the desired strength of the effect as an NSNumber.
The following code creates a filter that results in a hazy effect on the image:
func bloom(inputImage: CIImage) -> CIImage {
let bloomFilter = CIFilter.bloom()
bloomFilter.inputImage = inputImage
bloomFilter.radius = 10
bloomFilter.intensity = 1
return bloomFilter.outputImage!
}[Image]