gloom()
Adjusts an image’s color by applying a gloom filter.
Declaration
class func gloom() -> any CIFilter & CIGloomMentioned in
Return Value
The modified image.
Discussion
This method applies the gloom filter to an image. The effect reduces the highlights of the image resulting in the image looking dull.
The gloom filter uses the following properties:
inputImageAn image with the type CIImage.
- radius
A
floatrepresenting the area of effect as an NSNumber.- intensity
A
floatrepresenting the desired strength of the effect as an NSNumber.
The following code creates a filter that results in a darker image with a slight blur:
func gloom(inputImage: CIImage) -> CIImage {
let gloomFilter = CIFilter.gloom()
gloomFilter.inputImage = inputImage
gloomFilter.radius = 3
gloomFilter.intensity = 10
return gloomFilter.outputImage!
}[Image]