lightenBlendMode()
Blends colors from two images by brightening colors.
Declaration
class func lightenBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the lighten-blend mode filter to an image. The effect replaces any samples in the background image that are darker than input image.
The lighten-blend mode filter uses the following properties:
The following code creates a filter that results in the image that blends the input and background image colors:
func lightenBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let colorBlendFilter = CIFilter.lightenBlendMode()
colorBlendFilter.inputImage = inputImage
colorBlendFilter.backgroundImage = backgroundImage
return colorBlendFilter.outputImage!
}[Image]