maximumCompositing()
Applies a maximum compositing filter to an image.
Declaration
class func maximumCompositing() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the maximum compositing filter to an image. The effect calculates the maximum value for each color component in the input and background images. The filter then uses the resulting color to create the output image.
The maximum compositing filter uses the following properties:
The following code creates a filter that results in an image with a mixture of images’ colors:
func maximumCompositing(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let colorBlendFilter = CIFilter.maximumCompositing()
colorBlendFilter.inputImage = inputImage
colorBlendFilter.backgroundImage = backgroundImage
return colorBlendFilter.outputImage!
}[Image]