Contents

gloom()

Adjusts an image’s color by applying a gloom filter.

Declaration

class func gloom() -> any CIFilter & CIGloom

Mentioned 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:

inputImage

An image with the type CIImage.

radius

A float representing the area of effect as an NSNumber.

intensity

A float representing 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]

See Also

Filters