Contents

minimumCompositing()

Blends colors from two images by computing minimum values.

Declaration

class func minimumCompositing() -> any CIFilter & CICompositeOperation

Return Value

The modified image.

Discussion

This method applies the minimum compositing filter to an image. The effect calculates the minimum value for each color component in the input and background images. The filter then uses the resulting color to create the output image.

The minimum compositing filter uses the following properties:

inputImage

An image with the type CIImage.

backgroundImage

An image with the type CIImage.

The following code creates a filter that results in the output image becoming brighter with both images’ colors:

func minimumCompositing(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
    let colorBlendFilter = CIFilter.minimumCompositing()
    colorBlendFilter.inputImage = inputImage
    colorBlendFilter.backgroundImage = backgroundImage
    return colorBlendFilter.outputImage!
}

[Image]

See Also

Filters